2024-06-08 12:00:18 +12:00
|
|
|
FROM nginx:latest AS build
|
|
|
|
|
|
|
|
|
|
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
2024-06-09 22:52:01 +12:00
|
|
|
COPY entrypoint/docker-entrypoint.sh /docker-entrypoint.sh
|
2024-06-08 12:00:18 +12:00
|
|
|
|
|
|
|
|
# Create the folder structure for the cache
|
|
|
|
|
RUN mkdir -p /var/lib/nginx/pypi && \
|
2024-06-09 22:52:01 +12:00
|
|
|
chown -R www-data:www-data /var/lib/nginx && \
|
|
|
|
|
chmod a+x /docker-entrypoint.sh
|
2024-06-08 12:00:18 +12:00
|
|
|
|
|
|
|
|
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
|
2025-02-17 09:57:19 +13:00
|
|
|
# Transport scheme default is https
|
|
|
|
|
ENV TRANSPORT_SCHEME=https
|
2024-06-08 12:00:18 +12:00
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
|
|
|
|
|
|
|
|
|
STOPSIGNAL SIGQUIT
|
|
|
|
|
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|