Skip to content

Commit

Permalink
Merge pull request #1093 from coderanger/dockerfile-improvements
Browse files Browse the repository at this point in the history
Improvements for Dockerfile
  • Loading branch information
mbeacom authored Oct 1, 2019
2 parents 3663991 + 089a60f commit b3a6d85
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
FROM python:3.6.6-alpine3.8 as builder
FROM python:3.6-alpine as builder

RUN apk --no-cache add g++ zeromq-dev
RUN pip install locustio pyzmq
COPY . /src
WORKDIR /src
RUN pip install .

FROM python:3.6.6-alpine3.8
FROM python:3.6-alpine

RUN apk --no-cache add zeromq-dev
RUN apk --no-cache add zeromq && adduser -h / -s /bin/false -H -D locust
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

EXPOSE 8089 5557 5558

ENTRYPOINT ["./docker_start.sh"]
USER locust
CMD ["./docker_start.sh"]

0 comments on commit b3a6d85

Please sign in to comment.