Skip to content

Instantly share code, notes, and snippets.

Created March 16, 2016 08:39
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
App & Test container Dockerfile
FROM "<bases image>":"<version>"
WORKDIR "<path>"
# install packages required to run app and tests
RUN apt-get update && apt-get install -y \
"<app runtime> and <dependencies>" \ # add app runtime and required packages
"<test tools> and <dependencies>" \ # add testing tools and required packages
&& rm -rf /var/lib/apt/lists/*
# copy app files
COPY app app
# copy test scripts
COPY tests tests
# copy "main" test command
# ... EXPOSE, RUN, ADD ... for app and test environment
# main app command
CMD [, "<app arguments>"]
# it's not possible to have multiple CMD commands, but this is the "main" test command
# CMD [/, "<test arguments>"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment