Skip to content

refs #000: add version 1.24.0-alpine-slim #100

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

Open
wants to merge 1 commit into
base: feature/d8
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
matrix:
version:
[
1.24.0-alpine-slim,
1.23.3-alpine-slim,
1.23.3-alpine,
1.23.1-alpine,
Expand Down Expand Up @@ -53,6 +54,7 @@ jobs:
matrix:
version:
[
1.24.0-alpine-slim,
1.23.3-alpine-slim,
1.23.3-alpine,
1.23.1-alpine,
Expand Down
33 changes: 33 additions & 0 deletions Dockerfile-1.24.0-alpine-slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM nginx:1.24.0-alpine-slim

# Pass inexistent UUID (e.g.: 1001) to enhance the container security
ARG user=root

LABEL org.opencontainers.image.source https://github.com/sparkfabrik/docker-php-drupal-nginx/tree/feature/d8

COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY templates /templates
COPY config/custom.conf /etc/nginx/conf.d/000-custom.conf

RUN chmod +x /docker-entrypoint.sh && \
chmod 775 /etc/nginx && \
chmod 775 /etc/nginx/conf.d && \
chmod 664 /etc/nginx/conf.d/000-custom.conf && \
mkdir -p /etc/nginx/conf.d/custom && \
chmod 775 /etc/nginx/conf.d/custom && \
mkdir -p /etc/nginx/conf.d/fragments && \
chmod 775 /etc/nginx/conf.d/fragments && \
chgrp root /var/cache/nginx && \
chmod 775 /var/cache/nginx && \
chmod 775 /var/log/nginx && \
mkdir -p /var/run/nginx && \
chmod 775 /var/run/nginx && \
sed -i 's|/var/run/nginx.pid|/var/run/nginx/nginx.pid|g' /etc/nginx/nginx.conf && \
chmod 775 /templates && \
chmod 664 /etc/nginx/fastcgi.conf && \
chmod 664 /etc/nginx/conf.d/default.conf

# Go to target user
USER $user

ENTRYPOINT [ "/docker-entrypoint.sh" ]
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build:
docker build -f Dockerfile-1.23.1-alpine -t $(IMAGE_NAME):1.23.1-alpine.d8 --build-arg user=root .
docker build -f Dockerfile-1.23.3-alpine -t $(IMAGE_NAME):1.23.3-alpine.d8 --build-arg user=root .
docker build -f Dockerfile-1.23.3-alpine-slim -t $(IMAGE_NAME):1.23.3-alpine-slim.d8 --build-arg user=root .
docker build -f Dockerfile-1.24.0-alpine-slim -t $(IMAGE_NAME):1.24.0-alpine-slim.d8 --build-arg user=root .

test:
@chmod +x ./tests/tests.sh
Expand All @@ -22,6 +23,7 @@ test:
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.23.1-alpine.d8 ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.23.3-alpine.d8 ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.23.3-alpine-slim.d8 ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.24.0-alpine-slim.d8 ./tests/tests.sh

build-rootless:
docker build -f Dockerfile-1.13.6-alpine -t $(IMAGE_NAME):1.13.6-alpine.d8-rootless --build-arg user=1001 .
Expand All @@ -31,6 +33,7 @@ build-rootless:
docker build -f Dockerfile-1.23.1-alpine -t $(IMAGE_NAME):1.23.1-alpine.d8-rootless --build-arg user=1001 .
docker build -f Dockerfile-1.23.3-alpine -t $(IMAGE_NAME):1.23.3-alpine.d8-rootless --build-arg user=1001 .
docker build -f Dockerfile-1.23.3-alpine-slim -t $(IMAGE_NAME):1.23.3-alpine-slim.d8-rootless --build-arg user=1001 .
docker build -f Dockerfile-1.24.0-alpine-slim -t $(IMAGE_NAME):1.24.0-alpine-slim.d8-rootless --build-arg user=1001 .

test-rootless:
@chmod +x ./tests/tests.sh
Expand All @@ -41,6 +44,9 @@ test-rootless:
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.23.1-alpine.d8-rootless IMAGE_USER="unknown uid 1001" BASE_TESTS_PORT="8080" ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.23.3-alpine.d8-rootless IMAGE_USER="unknown uid 1001" BASE_TESTS_PORT="8080" ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.23.3-alpine-slim.d8-rootless IMAGE_USER="unknown uid 1001" BASE_TESTS_PORT="8080" ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.24.0-alpine.d8-rootless IMAGE_USER="unknown uid 1001" BASE_TESTS_PORT="8080" ./tests/tests.sh
@IMAGE_NAME=$(IMAGE_NAME) IMAGE_TAG=1.24.0-alpine-slim.d8-rootless IMAGE_USER="unknown uid 1001" BASE_TESTS_PORT="8080" ./tests/tests.sh


shellcheck-build:
@docker build -f shellcheck/Dockerfile -t sparkfabrik/shellchek shellcheck
Expand Down