32 lines
672 B
Docker
32 lines
672 B
Docker
# this Dockerfile should be built from the repo root
|
|
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS builder
|
|
|
|
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
|
ENV UV_PYTHON_DOWNLOADS=0
|
|
|
|
WORKDIR /build
|
|
|
|
COPY . /build
|
|
|
|
RUN uv build --package sshecret
|
|
RUN uv build --package sshecret-admin
|
|
|
|
|
|
FROM python:3.13-slim-bookworm
|
|
|
|
COPY --from=builder --chown=app:app /build/dist /opt/sshecret
|
|
|
|
COPY packages/sshecret-admin /opt/sshecret-admin
|
|
COPY docker/admin.entrypoint.sh /entrypoint.sh
|
|
|
|
RUN pip install /opt/sshecret/sshecret-*.whl
|
|
RUN pip install /opt/sshecret/sshecret_admin-*.whl
|
|
|
|
EXPOSE 8822
|
|
|
|
VOLUME /opt/sshecret-admin
|
|
|
|
WORKDIR /opt/sshecret-admin
|
|
|
|
CMD ["/entrypoint.sh"]
|