diff --git a/devbox/Dockerfile b/devbox/Dockerfile index 9a181178..c37fb8d5 100644 --- a/devbox/Dockerfile +++ b/devbox/Dockerfile @@ -1,7 +1,7 @@ FROM itzg/ubuntu-openjdk-7 RUN apt-get update -RUN apt-get install -yq git curl wget unzip +RUN apt-get install -yq git curl wget unzip openjdk-7-jdk ENV MAVEN_VER 3.2.2 ENV NODEJS_VER 0.10.29 @@ -24,4 +24,6 @@ VOLUME ["/shared"] RUN curl -s get.gvmtool.net | bash +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + CMD bash diff --git a/devbox/README.md b/devbox/README.md index 91219c28..2ebf54d8 100644 --- a/devbox/README.md +++ b/devbox/README.md @@ -3,3 +3,23 @@ Provides a development/build environment for Java, Groovy, and NodeJS. * Provides 'gvm' for Groovy (and more) installation management * Provides 'nave' for NodeJS installation management * Pre-installs the latest NodeJS via nave + +## Using the persistent/shared workarea + +Since devbox containers are intended to be disposable, the image is configured +with a "volume" at `/shared`. + +There are a couple of ways you can leverage that volume. Either attach it to +a host-local directory: + + docker run -it -v $(pwd)/workarea:/shared --rm itzg/devbox + +or run a "base" container and mounts the `/shared` from that onto any +subsequent containers: + + docker run --name devbox-base itzg/devbox touch /shared/READY + ...later... + docker run -it --volumes-from devbox-base --rm itzg/devbox + +**NOTE** I am using the `--rm` option so the devbox containers will be truly +"burn after use".