Skip to content

Instantly share code, notes, and snippets.

@edasque
Last active December 4, 2015 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edasque/6ebe46608aa51ecadc8f to your computer and use it in GitHub Desktop.
Save edasque/6ebe46608aa51ecadc8f to your computer and use it in GitHub Desktop.

With the following Dockerfile:

FROM debian:jessie
RUN cd /opt && mkdir nodebb
WORKDIR /opt/nodebb
RUN date > container_created.txt
CMD date > container_lastrun.txt ; /bin/bash

I built an image:

docker build --no-cache=true -t docker-sandbox .
touch /Users/ed/Dropbox/projects/docker-sandbox/app/bob.txt

Then I run the container with:

docker run 	--name docker-sandbox-1 -v /Users/ed/Dropbox/projects/docker-sandbox/app:/opt/nodebb -t -i docker-sandbox

What should I see?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment