Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
Created February 8, 2019 14:14
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 jefftriplett/d5664e75d62cdf62e24dc6c531e89c34 to your computer and use it in GitHub Desktop.
Save jefftriplett/d5664e75d62cdf62e24dc6c531e89c34 to your computer and use it in GitHub Desktop.
# Usage:
# Building
# docker build -t jefftriplett/pinboardbot .
# Running (no saved state)
# docker run -it \
# jefftriplett/pinboardbot
#
FROM python:3.6-alpine as builder
LABEL maintainer "Jeff Triplett <jeff.triplett@...>"
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY requirements.txt /src/
RUN set -x \
&& pip install \
--install-option="--prefix=/build" \
--no-cache-dir \
-r /src/requirements.txt \
&& rm -rf /root/.cache/
FROM python:3.6-alpine
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY --from=builder /build /usr/local
COPY . /src/
WORKDIR /src/
ENTRYPOINT [ "python", "chalicelib/pinboardbot.py" ]
CMD [ "--help" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment