Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
use python:3.7-slim image to avoid packages building steps for alpine and have a smaller image size
  • Loading branch information
redyvon authored Apr 30, 2020
1 parent 2e91b91 commit 7be3984
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
FROM alpine:3.6

RUN apk add --no-cache --update \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
python3
FROM python:3.7-slim

ADD . /moto/
ENV PYTHONUNBUFFERED 1

WORKDIR /moto/
RUN python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 --no-cache-dir install --upgrade pip setuptools && \
RUN pip3 --no-cache-dir install --upgrade pip setuptools && \
pip3 --no-cache-dir install ".[server]"

ENTRYPOINT ["/usr/bin/moto_server", "-H", "0.0.0.0"]
ENTRYPOINT ["/usr/local/bin/moto_server", "-H", "0.0.0.0"]

EXPOSE 5000

0 comments on commit 7be3984

Please sign in to comment.