Skip to content

Commit 27fede9

Browse files
authored
Create Dockerfile
1 parent d02b62b commit 27fede9

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

Dockerfile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This is a Dockerfile intended to be built using `docker buildx`
2+
# for multi-arch support. Building with `docker build` may have unexpected results.
3+
4+
# This file assumes that the frontend has been built using ./scripts/frontend-build
5+
6+
FROM jc21/nginx-full:certbot-node
7+
8+
ARG TARGETPLATFORM
9+
ARG BUILD_VERSION
10+
ARG BUILD_COMMIT
11+
ARG BUILD_DATE
12+
13+
# See: https://github.com/just-containers/s6-overlay/blob/master/README.md
14+
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
15+
S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
16+
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
17+
S6_FIX_ATTRS_HIDDEN=1 \
18+
S6_KILL_FINISH_MAXTIME=10000 \
19+
S6_VERBOSITY=1 \
20+
NODE_ENV=production \
21+
NPM_BUILD_VERSION="${BUILD_VERSION}" \
22+
NPM_BUILD_COMMIT="${BUILD_COMMIT}" \
23+
NPM_BUILD_DATE="${BUILD_DATE}"
24+
25+
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
26+
&& apt-get update \
27+
&& apt-get install -y --no-install-recommends jq logrotate \
28+
&& apt-get clean \
29+
&& rm -rf /var/lib/apt/lists/*
30+
31+
# s6 overlay
32+
COPY docker/scripts/install-s6 /tmp/install-s6
33+
RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
34+
35+
EXPOSE 80 81 443
36+
37+
COPY backend /app
38+
COPY frontend/dist /app/frontend
39+
COPY global /app/global
40+
41+
WORKDIR /app
42+
RUN yarn install \
43+
&& yarn cache clean
44+
45+
# add late to limit cache-busting by modifications
46+
COPY docker/rootfs /
47+
48+
# Remove frontend service not required for prod, dev nginx config as well
49+
RUN rm -rf /etc/s6-overlay/s6-rc.d/user/contents.d/frontend /etc/nginx/conf.d/dev.conf \
50+
&& chmod 644 /etc/logrotate.d/nginx-proxy-manager \
51+
&& pip uninstall --yes setuptools \
52+
&& pip install --no-cache-dir "setuptools==58.0.0"
53+
54+
VOLUME [ "/data", "/etc/letsencrypt" ]
55+
ENTRYPOINT [ "/init" ]
56+
57+
LABEL org.label-schema.schema-version="1.0" \
58+
org.label-schema.license="MIT" \
59+
org.label-schema.name="nginx-proxy-manager" \
60+
org.label-schema.description="Docker container for managing Nginx proxy hosts with a simple, powerful interface " \
61+
org.label-schema.url="https://github.com/jc21/nginx-proxy-manager" \
62+
org.label-schema.vcs-url="https://github.com/jc21/nginx-proxy-manager.git" \
63+
org.label-schema.cmd="docker run --rm -ti jc21/nginx-proxy-manager:latest"

0 commit comments

Comments
 (0)