mirror of
https://github.com/djrobstep/migra.git
synced 2024-09-11 13:56:05 +03:00
Fixes djrobstep/migra#177 Use python:3.9-alpine as base to reduce reliance on alpine maintainers for python and remove already provided packages (python3, python3-dev, ca-certificates). Remove bash since there is already a shell provided and the entrypoint-script is not using bash-exclusive syntax. Change entrypoint-script's shebang from bash to sh & fix array-to-string assignment see https://github.com/koalaman/shellcheck/wiki/SC2124
14 lines
424 B
Docker
14 lines
424 B
Docker
FROM python:3.9-alpine
|
|
|
|
RUN apk add --update --no-cache --upgrade postgresql-libs && \
|
|
apk add --no-cache --virtual=build-dependencies build-base postgresql-dev && \
|
|
pip install --no-cache-dir packaging psycopg2-binary migra && \
|
|
apk del build-dependencies && \
|
|
rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
|
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
CMD ["migra", "--help"]
|