2020-02-18 23:55:06 -05: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
|
|
|
|
|
2022-01-10 17:57:24 -05:00
|
|
|
FROM nginxproxymanager/nginx-full:certbot-node
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2020-02-20 19:52:43 -05:00
|
|
|
ARG TARGETPLATFORM
|
2020-02-18 23:55:06 -05:00
|
|
|
ARG BUILD_VERSION
|
|
|
|
ARG BUILD_COMMIT
|
|
|
|
ARG BUILD_DATE
|
|
|
|
|
2021-04-28 18:28:40 -04:00
|
|
|
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
|
|
|
|
S6_FIX_ATTRS_HIDDEN=1 \
|
|
|
|
S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
|
|
|
|
NODE_ENV=production \
|
|
|
|
NPM_BUILD_VERSION="${BUILD_VERSION}" \
|
|
|
|
NPM_BUILD_COMMIT="${BUILD_COMMIT}" \
|
|
|
|
NPM_BUILD_DATE="${BUILD_DATE}"
|
2020-02-18 23:55:06 -05:00
|
|
|
|
|
|
|
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
|
2021-04-28 18:28:40 -04:00
|
|
|
&& apt-get update \
|
2021-05-30 14:19:05 -04:00
|
|
|
&& apt-get install -y --no-install-recommends jq logrotate \
|
2021-04-28 18:28:40 -04:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2020-02-18 23:55:06 -05:00
|
|
|
|
|
|
|
# s6 overlay
|
2020-02-20 19:52:43 -05:00
|
|
|
COPY scripts/install-s6 /tmp/install-s6
|
|
|
|
RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2021-04-28 18:28:40 -04:00
|
|
|
EXPOSE 80 81 443
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2021-04-28 18:28:40 -04:00
|
|
|
COPY backend /app
|
|
|
|
COPY frontend/dist /app/frontend
|
|
|
|
COPY global /app/global
|
2020-02-18 23:55:06 -05:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
RUN yarn install
|
|
|
|
|
2021-02-06 20:05:40 -05:00
|
|
|
# add late to limit cache-busting by modifications
|
2021-04-28 18:28:40 -04:00
|
|
|
COPY docker/rootfs /
|
2021-02-06 20:05:40 -05:00
|
|
|
|
2020-02-18 23:55:06 -05:00
|
|
|
# Remove frontend service not required for prod, dev nginx config as well
|
2021-05-06 21:34:11 -04:00
|
|
|
RUN rm -rf /etc/services.d/frontend /etc/nginx/conf.d/dev.conf
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2021-05-30 14:19:05 -04:00
|
|
|
# Change permission of logrotate config file
|
|
|
|
RUN chmod 644 /etc/logrotate.d/nginx-proxy-manager
|
|
|
|
|
2022-01-17 06:46:26 -05:00
|
|
|
# fix for pip installs
|
|
|
|
# https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1769
|
|
|
|
RUN pip uninstall --yes setuptools \
|
|
|
|
&& pip install "setuptools==58.0.0"
|
|
|
|
|
2020-02-18 23:55:06 -05:00
|
|
|
VOLUME [ "/data", "/etc/letsencrypt" ]
|
2021-02-05 16:52:24 -05:00
|
|
|
ENTRYPOINT [ "/init" ]
|
2021-04-28 18:28:40 -04: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"
|