Skip to content

Commit

Permalink
Update Dockerfile to fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdoel committed Jul 16, 2024
1 parent 4887a18 commit 60fc6e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Python image to use in both stages
ARG python=python:3.9.19-alpine3.20
ARG PYTHON_IMAGE=python
ARG PYTHON_VERSION=3.9.19-alpine3.20

# Build stage
FROM ${python} AS builder
FROM ${PYTHON_IMAGE}:${PYTHON_VERSION} AS builder

# Create python virtual environment
RUN python3 -m venv /opt/venv
Expand All @@ -11,10 +12,10 @@ ENV PATH=/opt/venv/bin:$PATH
# Install package and its dependencies
WORKDIR /build
COPY . .
RUN pip install .
RUN pip install --no-cache-dir .

# Runtime stage
FROM ${python}
FROM ${PYTHON_IMAGE}:${PYTHON_VERSION}

# Copy the python virtual environment from the builder
COPY --from=builder /opt/venv /opt/venv
Expand Down

0 comments on commit 60fc6e1

Please sign in to comment.