Skip to content

Commit

Permalink
docker: fix alpine-based image
Browse files Browse the repository at this point in the history
  • Loading branch information
tomquist committed Jan 15, 2024
1 parent ccb77cc commit 678fed4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ ARG BASE=alpine
FROM gcr.io/distroless/python3-debian12 AS base-distroless
FROM python:3.11-alpine AS base-alpine

FROM debian:12-slim AS build
FROM debian:12-slim AS build-distroless
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev && \
python3 -m venv /venv && \
/venv/bin/pip install --upgrade pip setuptools wheel

FROM build AS build-venv
FROM python:3.11-alpine AS build-alpine
RUN python3 -m venv /venv && \
/venv/bin/pip install --upgrade pip setuptools wheel

FROM build-${BASE} AS build-venv
COPY requirements.txt /requirements.txt
RUN /venv/bin/pip install --disable-pip-version-check -r /requirements.txt

Expand Down

0 comments on commit 678fed4

Please sign in to comment.