Skip to content

Commit

Permalink
#39 [docker public hub] fix: public nginx image
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Aug 15, 2024
1 parent 17634ac commit 4e82a7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/nginx-docker-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
patch=0
minor=$((minor+1))
fi
if [ "$minor" -ge 10]; then
if [ "$minor" -ge 10 ]; then
minor=0
major=$((major+1))
fi
Expand Down Expand Up @@ -116,5 +116,5 @@ jobs:
${{ env.DOCKERHUB_ID }}/${{ env.IMAGE_NAME }}:${{ steps.inc_version.outputs.new_version }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PHP_VERSION=8.3
PHP_VERSION_SHORT=83
USER_ID=1000
GROUP_ID=1000
14 changes: 9 additions & 5 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
ARG PHP_VERSION=8.3
ARG PHP_VERSION_SHORT=83

FROM nginx:1.27.0-alpine
LABEL maintainer="Tan Nguyen <[email protected]>"
LABEL authors="cslant"
LABEL description="Nginx image for CSlant development - Using for Blog"

ARG USER_ID=1000
ARG GROUP_ID=1000

## Set Environment
ENV USER_ID=$USER_ID
ENV GROUP_ID=$GROUP_ID

COPY nginx.conf /etc/nginx/

RUN addgroup -g ${PHP_VERSION_SHORT} www-data && \
adduser -u ${PHP_VERSION_SHORT} -G www-data -D www-data
RUN addgroup -g ${USER_ID} www-data; \
adduser -u ${GROUP_ID} -D -S -G www-data www-data;

WORKDIR /var/dev

Expand Down

0 comments on commit 4e82a7c

Please sign in to comment.