-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (35 loc) · 1.64 KB
/
Dockerfile
File metadata and controls
40 lines (35 loc) · 1.64 KB
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
# syntax = docker/dockerfile:1@sha256:2780b5c3bab67f1f76c781860de469442999ed1a0d7992a5efdf2cffc0e3d769
# requires DOCKER_BUILDKIT=1 set when running docker build
# checkov:skip=CKV_DOCKER_2: no healthcheck (yet)
# checkov:skip=CKV_DOCKER_3: no user (yet)
FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
ARG BUILD_DATE
ARG BUILD_VERSION
ARG VCS_URL
ARG VCS_REF
ARG VCS_BRANCH
# See http://label-schema.org/rc1/ and https://microbadger.com/labels
LABEL maintainer="Jan Wagner <waja@cyconet.org>" \
org.label-schema.name="Nginx webserver" \
org.label-schema.description="Alpine Linux container with installed nginx package" \
org.label-schema.vendor="Cyconet" \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="${BUILD_DATE:-unknown}" \
org.label-schema.version="${BUILD_VERSION:-unknown}" \
org.label-schema.vcs-url="${VCS_URL:-unknown}" \
org.label-schema.vcs-ref="${VCS_REF:-unknown}" \
org.label-schema.vcs-branch="${VCS_BRANCH:-unknown}" \
org.opencontainers.image.source="https://github.com/waja/docker-nginx"
# hadolint ignore=DL3017,DL3018
RUN apk --no-cache update && apk --no-cache upgrade && \
# Install needed packages
apk add --update --no-cache nginx nginx-mod-http-fancyindex && rm -rf /var/cache/apk/* && \
# create needed directories
mkdir -p /run/nginx/ && \
# forward request and error logs to docker log collector
# See https://github.com/moby/moby/issues/19616
ln -sf /proc/1/fd/1 /var/log/nginx/access.log && \
ln -sf /proc/1/fd/1 /var/log/nginx/error.log
EXPOSE 80 443
STOPSIGNAL SIGTERM
CMD ["nginx", "-g", "daemon off;"]