- Persist installed packages, configuration and bash history for later.
- Automatically mount your project into the environment.
- Automatically discover previously built/modified enviroments (based on project path)
- Specify what base docker image to build environments on top off..
- Clone this repository and run
make install
- Go to the root directory of your project and run
devenv shell
- PROFIT!
All of the below assumes you to be located in your project directory.
devenv
bases all of its assumptions on where you are located on a file-system level.
Note: All options accepted by build
are also applicable to shell
By default, devenv
ships using the centos:6 docker image as a base image. This can be overridden via the command line:
devenv build --verbose --base_image=python:37
Any subsequent devenv shell
commands run inside the same directory, will default to this image until devenv clean
is run.
devenv build --verbose --dockerfile=./Dockerfile
After you have exited an environment, you can commit whatever you did while inside the environment to a Docker image:
devenv commit
devenv clean
Note: All options accepted by build
are also applicable to shell
devenv shell
Start shell in docker container based off ubuntu - rather than the default centos.
devenv shell --verbose --base_image=ubuntu:latest
devenv shell --volume=/tmp:/tmp --volume ~.aws:/root/.aws
Docker does not allow new volumes to be mounted on existing containers.
To circumvent this limitation, the -—new
option causes the following to be performed:
- commit the existing environment container to a new image (overwriting any previous image)
- delete the existing container
- recreate the container (based on the image from step #1) with the new volume mounts.
This allows us to specify new volumes for an existing environment.
Note: Existing volume mounts need to be re-specified when invoking --new
devenv shell --new --volume=/tmp:/tmp --volume ~.aws:/root/.aws --volume /var/log:/var/log
Pull requests are welcome.