Moved to alpine
All checks were successful
Build Docker Image / build-and-deploy-image (push) Successful in 33s
All checks were successful
Build Docker Image / build-and-deploy-image (push) Successful in 33s
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
|
FROM ghcr.io/astral-sh/uv:python3.12-alpine AS builder
|
||||||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
@@ -10,23 +10,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||||||
uv sync --frozen --no-dev
|
uv sync --frozen --no-dev
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.12-slim
|
FROM python:3.12-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# hadolint ignore=DL3008
|
# hadolint ignore=DL3018
|
||||||
RUN apt-get update && \
|
RUN apk add --no-cache tini
|
||||||
apt-get install -y --no-install-recommends locales tini && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf /var/cache/apt && \
|
|
||||||
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
|
||||||
locale-gen
|
|
||||||
|
|
||||||
ENV LANG=en_US.UTF-8 \
|
ENV PATH="/app/.venv/bin:$PATH"
|
||||||
LANGUAGE=en_US:en \
|
|
||||||
LC_ALL=en_US.UTF-8 \
|
|
||||||
PATH="/app/.venv/bin:$PATH"
|
|
||||||
|
|
||||||
COPY --from=builder --chown=app:app /app /app
|
COPY --from=builder /app /app
|
||||||
COPY app.py /app/
|
COPY app.py /app/
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|||||||
Reference in New Issue
Block a user