-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
38 lines (29 loc) · 1.24 KB
/
Containerfile
File metadata and controls
38 lines (29 loc) · 1.24 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
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PACKAGES="nginx"
LABEL org.opencontainers.image.title="nginx-base" \
org.opencontainers.image.description="FreeBSD nginx base image with s6 supervision" \
org.opencontainers.image.source="https://github.com/daemonless/nginx-base" \
org.opencontainers.image.url="https://nginx.org/" \
org.opencontainers.image.documentation="https://nginx.org/en/docs/" \
org.opencontainers.image.licenses="BSD-2-Clause" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.type="base" \
io.daemonless.category="Base" \
io.daemonless.packages="${PACKAGES}"
# Install nginx
# Note: umask 022 ensures directories are created with correct permissions
RUN umask 022 && pkg update && \
pkg install -y ${PACKAGES} && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Create directories (ownership set at runtime by cont-init)
RUN mkdir -p /var/log/nginx /usr/local/www/html
# Copy nginx service and default config
COPY root/ /
# Make scripts executable
RUN chmod +x /etc/services.d/nginx/run /etc/cont-init.d/* 2>/dev/null || true
STOPSIGNAL SIGQUIT
EXPOSE 80 443