mirror of
https://github.com/djrobstep/migra.git
synced 2024-09-11 13:56:05 +03:00
[feat] Changed Dockerfile to use alpine. Size reduced from more than 350MB to 92MB
This commit is contained in:
parent
14940abc8f
commit
447068ec0c
19
Dockerfile
19
Dockerfile
@ -1,14 +1,13 @@
|
||||
FROM python:3.6
|
||||
FROM alpine:3.7
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
RUN apk add --no-cache python3 ca-certificates postgresql-dev && \
|
||||
apk add --no-cache --virtual=build-dependencies build-base python3-dev && \
|
||||
pip3 install --upgrade --no-cache-dir pip && \
|
||||
pip3 install --no-cache-dir psycopg2-binary migra && \
|
||||
apk del build-dependencies && \
|
||||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
|
||||
|
||||
COPY \
|
||||
requirements.txt \
|
||||
setup.py \
|
||||
README.md \
|
||||
./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
ENTRYPOINT [ "/usr/bin/migra" ]
|
||||
|
||||
COPY . .
|
||||
CMD ["--help"]
|
||||
|
||||
ENTRYPOINT [ "migra" ]
|
||||
|
Loading…
Reference in New Issue
Block a user