Skip to content

Commit

Permalink
Optimize base docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh committed May 15, 2024
1 parent 0380e83 commit f19db0c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions DockerfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ LABEL com.abhinavsingh.name="abhinavsingh/proxy.py" \
org.opencontainers.image.vendor="Abhinav Singh"

ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1

# Install paramiko and cryptography to allow
# users to use tunneling features using Docker
Expand All @@ -28,10 +29,13 @@ RUN apk update && apk --no-cache add \
rust \
make
RUN python -m venv /proxy/venv && \
/proxy/venv/bin/pip install --no-cache-dir \
/proxy/venv/bin/pip install --no-compile --no-cache-dir \
-U pip wheel && \
/proxy/venv/bin/pip install --no-cache-dir \
/proxy/venv/bin/pip install --no-compile --no-cache-dir \
paramiko==3.4.0 \
cryptography==39.0.1 \
--prefer-binary
RUN apk del .builddeps
--prefer-binary && \
apk del .builddeps && \
find . -type d -name '__pycache__' | xargs rm -rf && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache/

0 comments on commit f19db0c

Please sign in to comment.