2020-02-19 04:55:06 +00:00
|
|
|
# This is a Dockerfile intended to be built using `docker buildx`
|
|
|
|
# for multi-arch support. Building with `docker build` may have unexpected results.
|
|
|
|
|
|
|
|
# This file assumes that the frontend has been built using ./scripts/frontend-build
|
|
|
|
|
2024-01-09 23:32:12 +00:00
|
|
|
FROM nginxproxymanager/nginx-full:certbot-node
|
2020-02-19 04:55:06 +00:00
|
|
|
|
2020-02-21 00:52:43 +00:00
|
|
|
ARG TARGETPLATFORM
|
2020-02-19 04:55:06 +00:00
|
|
|
ARG BUILD_VERSION
|
|
|
|
ARG BUILD_COMMIT
|
|
|
|
ARG BUILD_DATE
|
|
|
|
|
2023-05-09 23:57:24 +00:00
|
|
|
# See: https://github.com/just-containers/s6-overlay/blob/master/README.md
|
2021-04-28 22:28:40 +00:00
|
|
|
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
|
|
|
|
S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
|
2023-05-09 23:57:24 +00:00
|
|
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
|
|
|
S6_FIX_ATTRS_HIDDEN=1 \
|
|
|
|
S6_KILL_FINISH_MAXTIME=10000 \
|
|
|
|
S6_VERBOSITY=1 \
|
2021-04-28 22:28:40 +00:00
|
|
|
NODE_ENV=production \
|
|
|
|
NPM_BUILD_VERSION="${BUILD_VERSION}" \
|
|
|
|
NPM_BUILD_COMMIT="${BUILD_COMMIT}" \
|
2024-01-09 23:32:12 +00:00
|
|
|
NPM_BUILD_DATE="${BUILD_DATE}" \
|
|
|
|
NODE_OPTIONS="--openssl-legacy-provider"
|
2020-02-19 04:55:06 +00:00
|
|
|
|
|
|
|
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
|
2021-04-28 22:28:40 +00:00
|
|
|
&& apt-get update \
|
2021-05-30 18:19:05 +00:00
|
|
|
&& apt-get install -y --no-install-recommends jq logrotate \
|
2021-04-28 22:28:40 +00:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2020-02-19 04:55:06 +00:00
|
|
|
|
|
|
|
# s6 overlay
|
2023-03-16 22:50:32 +00:00
|
|
|
COPY docker/scripts/install-s6 /tmp/install-s6
|
2020-02-21 00:52:43 +00:00
|
|
|
RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
|
2020-02-19 04:55:06 +00:00
|
|
|
|
2021-04-28 22:28:40 +00:00
|
|
|
EXPOSE 80 81 443
|
2020-02-19 04:55:06 +00:00
|
|
|
|
2021-04-28 22:28:40 +00:00
|
|
|
COPY backend /app
|
|
|
|
COPY frontend/dist /app/frontend
|
|
|
|
COPY global /app/global
|
2020-02-19 04:55:06 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
2023-03-21 23:42:16 +00:00
|
|
|
RUN yarn install \
|
|
|
|
&& yarn cache clean
|
2020-02-19 04:55:06 +00:00
|
|
|
|
2021-02-07 01:05:40 +00:00
|
|
|
# add late to limit cache-busting by modifications
|
2021-04-28 22:28:40 +00:00
|
|
|
COPY docker/rootfs /
|
2021-02-07 01:05:40 +00:00
|
|
|
|
2020-02-19 04:55:06 +00:00
|
|
|
# Remove frontend service not required for prod, dev nginx config as well
|
2023-07-19 02:05:57 +00:00
|
|
|
RUN rm -rf /etc/s6-overlay/s6-rc.d/user/contents.d/frontend /etc/nginx/conf.d/dev.conf \
|
2024-01-09 23:32:12 +00:00
|
|
|
&& chmod 644 /etc/logrotate.d/nginx-proxy-manager
|
2022-01-17 11:46:26 +00:00
|
|
|
|
2023-10-15 06:55:36 +00:00
|
|
|
VOLUME [ "/data" ]
|
2021-02-05 21:52:24 +00:00
|
|
|
ENTRYPOINT [ "/init" ]
|
2021-04-28 22:28:40 +00:00
|
|
|
|
|
|
|
LABEL org.label-schema.schema-version="1.0" \
|
|
|
|
org.label-schema.license="MIT" \
|
|
|
|
org.label-schema.name="nginx-proxy-manager" \
|
|
|
|
org.label-schema.description="Docker container for managing Nginx proxy hosts with a simple, powerful interface " \
|
|
|
|
org.label-schema.url="https://github.com/jc21/nginx-proxy-manager" \
|
|
|
|
org.label-schema.vcs-url="https://github.com/jc21/nginx-proxy-manager.git" \
|
|
|
|
org.label-schema.cmd="docker run --rm -ti jc21/nginx-proxy-manager:latest"
|