Skip to content

Commit

Permalink
Cleanup dkimpy
Browse files Browse the repository at this point in the history
Signed-off-by: Jauder Ho <[email protected]>
  • Loading branch information
jauderho committed May 29, 2024
1 parent aa0a2a9 commit 181f6e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
19 changes: 7 additions & 12 deletions dkimpy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM alpine:3.20.0@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd
#FROM python:3.13.0b1-alpine3.19@sha256:f2028c7ea4005bfa797d91717dc8f5f8990bb592d10d5b014513ac4405f99267
#FROM python:3.13.0b1-alpine3.19@sha256:f2028c7ea4005bfa797d91717dc8f5f8990bb592d10d5b014513ac4405f99267

ARG BUILD_VERSION

Expand All @@ -12,26 +11,22 @@ ENV PIP_NO_CACHE_DIR=1
COPY requirements.txt .

RUN \
apk update && \
apk upgrade -a && \
build_pkgs="cargo build-base libffi-dev openssl-dev python3-dev" && \
apk update && \
apk upgrade -a && \
build_pkgs="cargo build-base libffi-dev openssl-dev python3-dev" && \
runtime_pkgs="ca-certificates openssl python3 py3-pip" && \
apk --no-cache add --virtual build-dependencies ${build_pkgs} && \
apk --no-cache add ${runtime_pkgs} && \
python3 -m pip install --no-cache-dir --upgrade pip --break-system-packages && \
pip3 install --no-cache-dir --upgrade wheel --break-system-packages && \
pip3 install --no-cache-dir -r requirements.txt --break-system-packages && \
apk del build-dependencies && \
python3 -m pip install --no-cache-dir --upgrade pip --break-system-packages && \
pip3 install --no-cache-dir --upgrade wheel --break-system-packages && \
pip3 install --no-cache-dir -r requirements.txt --break-system-packages && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache/pip && \
find /usr/lib/ -name '__pycache__' -print0 | xargs -0 -n1 rm -rf && \
find /usr/lib/ -name '*.pyc' -print0 | xargs -0 -n1 rm -rf && \
rm -rf /root/.cargo

# apt-get purge -y python3-dev && \
#RUN pip install sslyze==${BUILD_VERSION}
#RUN pip3 install --no-cache-dir -r requirements.txt

LABEL org.opencontainers.image.authors="Jauder Ho <[email protected]>"
LABEL org.opencontainers.image.url="https://github.com/jauderho/dockerfiles"
LABEL org.opencontainers.image.documentation="https://github.com/jauderho/dockerfiles"
Expand Down
6 changes: 0 additions & 6 deletions dkimpy/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM ubuntu:24.04@sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15
#FROM python:3.13.0b1-alpine3.19@sha256:f2028c7ea4005bfa797d91717dc8f5f8990bb592d10d5b014513ac4405f99267
#FROM python:3.13.0b1-alpine3.19@sha256:f2028c7ea4005bfa797d91717dc8f5f8990bb592d10d5b014513ac4405f99267

ARG BUILD_VERSION
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -21,10 +19,6 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean

# apt-get purge -y python3-dev && \
#RUN pip install sslyze==${BUILD_VERSION}
#RUN pip3 install --no-cache-dir -r requirements.txt

LABEL org.opencontainers.image.authors="Jauder Ho <[email protected]>"
LABEL org.opencontainers.image.url="https://github.com/jauderho/dockerfiles"
LABEL org.opencontainers.image.documentation="https://github.com/jauderho/dockerfiles"
Expand Down

0 comments on commit 181f6e6

Please sign in to comment.