Skip to content

Instantly share code, notes, and snippets.

@edamico
Last active September 19, 2015 15:12
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 edamico/3dace8e3bde4c5b0ae51 to your computer and use it in GitHub Desktop.
Save edamico/3dace8e3bde4c5b0ae51 to your computer and use it in GitHub Desktop.
Dockerfile post sample
FROM ubuntu
MAINTAINER NaN Labs
# install default aptitude apache2
# try to use the less amount of RUN executions
# to reduce the image binary file
RUN apt-get update && apt-get install -y apache2
# environment variable deployKey will be available
# when running the container
ENV deployKey, 123456
# expose only these two ports
EXPOSE 80 443
# exposes apache2 directories
VOLUME ["/var/log/apache2", "/var/www","/etc/apache2/sites-enabled/"]
# add an init file from the recipe bin dir to the container /tmp dir
COPY bin/init.sh /tmp/init.sh
# dynamic steps
# any future based env command could be run here
CMD /bin/bash
# this is the same as CMD but, but more expresive entrypoint
ENTRYPOINT tail -f /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment