Created
February 8, 2019 14:14
-
-
Save jefftriplett/d5664e75d62cdf62e24dc6c531e89c34 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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