Files
pypi-proxy/Dockerfile
Aaron Guise 42ef0f96f6
Some checks failed
CI / release (push) Failing after 1m29s
feat: Add configurable TRANSPORT_SCHEME
Can now set environment var TRANSPORT_SCHEME=http if you would want to revert from default https transport.
2025-02-17 09:57:19 +13:00

29 lines
672 B
Docker

FROM nginx:latest AS build
COPY conf/nginx.conf /etc/nginx/nginx.conf
COPY entrypoint/docker-entrypoint.sh /docker-entrypoint.sh
# Create the folder structure for the cache
RUN mkdir -p /var/lib/nginx/pypi && \
chown -R www-data:www-data /var/lib/nginx && \
chmod a+x /docker-entrypoint.sh
FROM scratch as final
COPY --from=build / /
# Where the cache data is stored in case you want to persist ;)
VOLUME [ "/var/lib/nginx/pypi" ]
# Nginx is listening on port 80
EXPOSE 80
ENV TZ=Pacific/Auckland
# Transport scheme default is https
ENV TRANSPORT_SCHEME=https
ENTRYPOINT [ "/docker-entrypoint.sh" ]
STOPSIGNAL SIGQUIT
CMD ["nginx", "-g", "daemon off;"]