This repository has been archived by the owner on Feb 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.nginx
43 lines (36 loc) · 1.59 KB
/
Dockerfile.nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM nginx:1.18.0 as base
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
ARG TIME_ZONE
ENV TIME_ZONE=Poland
RUN mkdir -p /opt/var/cache/nginx ;\
cp -a --parents /usr/lib/nginx /opt ;\
cp -a --parents /usr/share/nginx /opt ;\
cp -a --parents /var/log/nginx /opt ;\
cp -aL --parents /var/run /opt ;\
cp -a --parents /etc/nginx /opt ;\
cp -a --parents /etc/passwd /opt ;\
cp -a --parents /etc/group /opt ;\
cp -a --parents /usr/sbin/nginx /opt ;\
cp -a --parents /usr/sbin/nginx-debug /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/ld-* /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/libpcre.so.* /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/libz.so.* /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/libc* /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/libdl* /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/libpthread* /opt ;\
cp -a --parents /lib/x86_64-linux-gnu/libcrypt* /opt ;\
cp -a --parents /usr/lib/x86_64-linux-gnu/libssl.so.* /opt ;\
cp -a --parents /usr/lib/x86_64-linux-gnu/libcrypto.so.* /opt ;\
cp /usr/share/zoneinfo/${TIME_ZONE:-ROC} /opt/etc/localtime;
FROM gcr.io/distroless/base-debian10
ENV VMC_VERSION=${VMC_VERSION}
LABEL org.label-schema.schema-version="$VMC_VERSION" \
org.label-schema.license="Apache-2.0" \
org.label-schema.url="http://dsecure.me"\
org.label-schema.vendor="DSecure.me" \
org.label-schema.name="VMC"
COPY --from=base /opt /
COPY --from=vmc-builder /usr/share/vmc/static /usr/share/vmc/static/
COPY docker/nginx/root /
EXPOSE 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]