Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create new nginx base image #8404

Merged
merged 1 commit into from
Mar 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions images/nginx/rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,41 +33,42 @@ COPY --from=builder /opt /opt
COPY --from=builder /etc/nginx /etc/nginx
COPY --from=builder entrypoint.sh /usr/local/entrypoint.sh

RUN apk update \
RUN chmod +x /usr/local/entrypoint.sh \
&& apk update \
&& apk upgrade \
&& apk add -U --no-cache \
bash \
openssl \
pcre \
zlib \
geoip \
curl \
ca-certificates \
patch \
yajl \
lmdb \
libxml2 \
libmaxminddb \
yaml-cpp \
dumb-init \
nano \
tzdata \
bash \
openssl \
pcre \
zlib \
geoip \
curl \
ca-certificates \
patch \
yajl \
lmdb \
libxml2 \
libmaxminddb \
yaml-cpp \
dumb-init \
nano \
tzdata \
&& ln -s /usr/local/nginx/sbin/nginx /sbin/nginx \
&& adduser -S -D -H -u 101 -h /usr/local/nginx \
-s /sbin/nologin -G www-data -g www-data www-data \
-s /sbin/nologin -G www-data -g www-data www-data \
&& bash -eu -c ' \
writeDirs=( \
/var/log/nginx \
/var/lib/nginx/body \
/var/lib/nginx/fastcgi \
/var/lib/nginx/proxy \
/var/lib/nginx/scgi \
/var/lib/nginx/uwsgi \
/var/log/audit \
/var/log/nginx \
/var/lib/nginx/body \
/var/lib/nginx/fastcgi \
/var/lib/nginx/proxy \
/var/lib/nginx/scgi \
/var/lib/nginx/uwsgi \
/var/log/audit \
); \
for dir in "${writeDirs[@]}"; do \
mkdir -p ${dir}; \
chown -R www-data.www-data ${dir}; \
mkdir -p ${dir}; \
chown -R www-data.www-data ${dir}; \
done'

EXPOSE 80 443
Expand Down