Skip to content

Commit

Permalink
Slim docker image
Browse files Browse the repository at this point in the history
Base the dockerfile on slim python image.
This roughly reduces image size by 75%.

Signed-off-by: David Rozé <[email protected]>
  • Loading branch information
david-baylibre committed Jan 11, 2024
1 parent 988dd5e commit 6b748a6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
FROM python:3
RUN git config --global user.email [email protected] && \
git config --global user.name repo-resource && \
git config --global color.ui never
FROM python:3-slim

RUN apt update \
&& apt install -y git procps \
&& apt upgrade -y \
&& apt autoremove \
&& rm -rf /var/lib/apt/lists/*

RUN git config --global user.email [email protected] \
&& git config --global user.name repo-resource \
&& git config --global color.ui never

COPY ssh_config /root/.ssh/config

COPY repo_resource/requirements.txt /opt/resource/requirements.txt
RUN pip install -r opt/resource/requirements.txt

COPY repo_resource/check.py /opt/resource/check
COPY repo_resource/in_.py /opt/resource/in
COPY repo_resource/out.py /opt/resource/out
Expand Down

0 comments on commit 6b748a6

Please sign in to comment.