Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using docker multi-stage for 50% smaller image #1091

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM python:3.6.6-alpine3.8
FROM python:3.6.6-alpine3.8 as builder

RUN apk --no-cache add g++ zeromq-dev
RUN pip install locustio pyzmq

RUN apk --no-cache add g++ \
&& apk --no-cache add zeromq-dev \
&& pip install locustio pyzmq
FROM python:3.6.6-alpine3.8

RUN apk --no-cache add zeromq-dev
COPY --from=builder /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages
COPY --from=builder /usr/local/bin/locust /usr/local/bin/locust
COPY docker_start.sh docker_start.sh
RUN chmod +x docker_start.sh

Expand Down