Skip to content

Instantly share code, notes, and snippets.

@pwyliu
Created March 2, 2016 01:01
Show Gist options
  • Save pwyliu/6906c06f762af4a93718 to your computer and use it in GitHub Desktop.
Save pwyliu/6906c06f762af4a93718 to your computer and use it in GitHub Desktop.
A sample dockerfile
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