Created
March 2, 2016 01:01
-
-
Save pwyliu/6906c06f762af4a93718 to your computer and use it in GitHub Desktop.
A sample dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu-debootstrap:precise | |
# Install repo | |
RUN apt-get -qq update && \ | |
apt-get -qq install curl apt-transport-https --no-install-recommends && \ | |
curl ${REPO_KEY} | apt-key add - && \ | |
echo "deb ${REPO_URL} precise main" >> /etc/apt/sources.list && \ | |
rm -rf /var/lib/apt/lists/* && rm -rf /usr/share/man/* && rm -rf /usr/share/doc/* | |
# Install service | |
RUN apt-get -qq update && \ | |
apt-get -qq install ${PACKAGE_NAME} --no-install-recommends && \ | |
rm -rf /var/lib/apt/lists/* && rm -rf /usr/share/man/* && rm -rf /usr/share/doc/* | |
# Entrypoint | |
WORKDIR service-dir | |
ENTRYPOINT ["${PATH_TO_SERVICE}"] | |
EXPOSE ${SERVICE_PORT} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment