Skip to content

Commit

Permalink
Docker image OS updates
Browse files Browse the repository at this point in the history
OS updates must be done both in builder and runtime images.

Signed-off-by: Leonardo Rodrigues de Mello <[email protected]>
  • Loading branch information
lmello authored Feb 16, 2024
1 parent a2af695 commit b8e0b77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.11-bookworm as builder

RUN apt-get update && apt-get -y upgrade && mkdir -p /app/ && python3 -m venv /app/.venv
RUN apt-get install -y cmake
RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake && apt-get -y clean && mkdir -p /app/ && python3 -m venv /app/.venv
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
COPY requirements.txt /app/
RUN cd app && source .venv/bin/activate && pip3 install -r requirements.txt

FROM python:3.11-bookworm as runtime-image
RUN apt-get update && apt-get -y upgrade && apt-get -y clean
RUN useradd --create-home --shell /bin/sh --uid 8000 opencost
COPY --from=builder /app /app
COPY src/opencost_parquet_exporter.py /app/opencost_parquet_exporter.py
Expand Down

0 comments on commit b8e0b77

Please sign in to comment.