migra/Dockerfile
Nico Nußbaum 01acaf2eda
Fix container image build (#178)
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
2021-05-20 13:21:07 +10:00

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"]