Skip to content

luiscarlosgph/docker-templates

Repository files navigation

Description

Dockerfile respository for different tasks.

Prerequisites

  • Docker: follow this guide to install it.
  • dockerx: follow this guide to install it.

List of templates

If you click on any template below, you will see a guide on how to use it.

How to use any of the templates

  1. Clone this repository:

    $ git clone https://github.com/luiscarlosgph/docker-templates.git
    $ cd docker-templates
    
  2. Build the image you want to deploy:

    $ cd <image_dir>
    $ chmod +x build.sh
    $ ./build.sh <your_favourite_image_name>
    

    For example, for the luiscarlosgph/pycharm:latest image:

    $ cd pycharm
    $ chmod +x build.sh
    $ ./build.sh luiscarlosgph/pycharm:latest
    

    You do not need to follow the luiscarlosgph/pycharm:latest syntax, you can simply write whatever as name of the image.

  3. Launch container:

    $ python -m dockerx.run --name <container_name> --image <image_name> --nvidia 1 --command 'sleep infinity'
    

    For example, for the luiscarlosgph/pycharm:latest image:

    $ python -m dockerx.run --name wild_turin --image luiscarlosgph/pycharm:latest --nvidia 1 --command 'sleep infinity'
    

    dockerx also allows you to mount volumes and set environment variables using the parameters --volume and --env. More info here.

  4. Get a terminal of the container:

    $ docker exec -it <container_name> <terminal_path>
    

    For example, for the container named wild_turin:

    docker exec -it wild_turin /bin/bash 
    

    More info on the parameters of docker exec here.

About

Repository of Dockerfiles for multiple tasks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published