deployment-helper/Dockerfile
Frank Agerholm 4de4c398c6
Some checks failed
Build and Push Docker Image / build (push) Failing after 20s
Build-Dependency py3-requests
2026-01-18 20:00:13 +01:00

21 lines
863 B
Docker

FROM docker.io/library/python:3.11-alpine AS cabuilder
RUN apk add --no-cache ca-certificates py3-requests
ADD bin/fetch_letsencrypt_ca_certs.py /usr/local/bin/fetch_letsencrypt_ca_certs.py
RUN /usr/local/bin/fetch_letsencrypt_ca_certs.py /usr/local/share/ca-certificates/
RUN update-ca-certificates
FROM docker.io/library/python:3.11-alpine
RUN apk --no-cache add sshpass openssh-client lftp nodejs npm; mkdir -p /opt/app
WORKDIR /opt/app
ADD requirements.txt /root/
ADD Dockerfile /root/
ADD bin/*.sh /usr/local/bin/
COPY --from=cabuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# ignore "Running pip as root" warning
ENV PIP_ROOT_USER_ACTION=ignore
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
RUN chmod 755 /usr/local/bin/*.sh && pip install -r /root/requirements.txt && pip freeze && rm -Rf "$(pip cache dir)"