mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
34 lines
1.1 KiB
Docker
34 lines
1.1 KiB
Docker
FROM python:3.10-alpine@sha256:cf8ad3b55fcf5fa0cfeecabc65878f7504c8e6ec5c8af5511b0a039cc46a1ac3
|
|
|
|
# Install python dependencies
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
build-base libffi-dev postgresql-dev cargo
|
|
|
|
# Copy python requirements
|
|
COPY src/deps/requirements.txt /tmp/requirements-deps.txt
|
|
COPY src/common/db/requirements.txt /tmp/req/requirements-db.txt
|
|
|
|
WORKDIR /usr/share/migration
|
|
|
|
# Install python requirements
|
|
RUN export MAKEFLAGS="-j$(nproc)" && \
|
|
pip install --no-cache-dir --require-hashes --break-system-packages -r /tmp/requirements-deps.txt && \
|
|
pip install --no-cache-dir --require-hashes -r /tmp/req/requirements-db.txt
|
|
|
|
# Install dependencies
|
|
RUN apk add --no-cache bash sed curl mariadb-connector-c mariadb-client postgresql-client sqlite tzdata
|
|
|
|
# Cleanup
|
|
RUN apk del .build-deps && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
# Copy files
|
|
COPY src/common/db/alembic/alembic.ini alembic.ini
|
|
COPY src/common/db/alembic/env.py env.py
|
|
COPY src/common/db/alembic/script.py.mako script.py.mako
|
|
COPY src/common/db/model.py latest_model.py
|
|
COPY misc/migration/entrypoint.sh entrypoint.sh
|
|
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
ENTRYPOINT [ "./entrypoint.sh" ]
|