0.2, update to chainguard
Build and Publish Docker Image / Build and Push Docker Image (push) Successful in 7m23s Details

This commit is contained in:
Isaac Johnson 2026-11-11 20:01:09 -06:00
parent 25696c5ccc
commit 775e90df1c
2 changed files with 8 additions and 6 deletions

View File

@ -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
#harbor.freshbrewed.science/library/trymeapp

View File

@ -1,2 +1,2 @@
[version]
version = 0.1
version = 0.2