diff --git a/Dockerfile b/Dockerfile index d8c9aa7..7e2285a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ COPY frontend/ ./ RUN npm run build # Stage 2: Build Python virtual environment -FROM python:3.11-slim AS python-builder +FROM cgr.dev/chainguard/python:latest-dev AS python-builder +USER root WORKDIR /build RUN python -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" @@ -16,7 +17,8 @@ COPY app/ ./app/ RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir . # Stage 3: Production Runtime -FROM python:3.11-slim AS runtime +FROM cgr.dev/chainguard/python:latest-dev AS runtime +USER root WORKDIR /app ENV PYTHONDONTWRITEBYTECODE=1 \ @@ -24,8 +26,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ PATH="/opt/venv/bin:$PATH" \ PORT=8000 -RUN groupadd --gid 1001 appgroup && \ - useradd --uid 1001 --gid appgroup --create-home appuser && \ +RUN addgroup -g 1001 appgroup && \ + adduser -D -u 1001 -G appgroup appuser && \ mkdir -p /data && chown -R appuser:appgroup /app /data COPY --from=python-builder /opt/venv /opt/venv @@ -44,4 +46,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=4)" || exit 1 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -#harbor.freshbrewed.science/library/trymeapp \ No newline at end of file +#harbor.freshbrewed.science/library/trymeapp diff --git a/version.ini b/version.ini index 1a9b0ac..a52ab50 100644 --- a/version.ini +++ b/version.ini @@ -1,2 +1,2 @@ [version] -version = 0.1 +version = 0.2