From 63d8a66a3f5096daa5820bbb524061b297a30f8e Mon Sep 17 00:00:00 2001 From: D Date: Tue, 23 Apr 2024 11:16:20 +0300 Subject: [PATCH 1/2] add: support run web port on 80 or 443 --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c8c906e..43c107d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,9 +20,11 @@ FROM node:${NODE_VERSION}-alpine COPY --from=build /app /app RUN set -x \ - && apk add --no-cache tzdata \ + && apk add --no-cache tzdata libcap \ && mkdir -p /data \ - && cp /app/config.json /data/config.json + && cp /app/config.json /data/config.json \ + # support port 80/443 + && setcap 'cap_net_bind_service=+ep' `which node` WORKDIR /app From 359491193b48976af5fdb110ad5876e901090165 Mon Sep 17 00:00:00 2001 From: D Date: Tue, 23 Apr 2024 11:19:28 +0300 Subject: [PATCH 2/2] upd: set latest node 18 --- .github/workflows/docker-build.yml | 14 ++++---------- Dockerfile | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index c82b3ac..ae8dca7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -7,13 +7,12 @@ on: jobs: build: env: - NODE_LATEST: 16 + NODE_LATEST: 18 runs-on: ubuntu-latest strategy: matrix: - node: [ 14, 16, 18 ] - suffix: [ "" ] + node: [ 16, 18, 20 ] steps: - name: 1-checkout @@ -23,14 +22,9 @@ jobs: - name: 2-setup-image-setting id: setting run: | - SUFFIX="" - if [ "${{ matrix.suffix }}" != "" ]; then - SUFFIX="-${{ matrix.suffix}}" - fi - - TAGS="ghcr.io/${{ github.repository }}:${{ matrix.node }}$SUFFIX" + TAGS="ghcr.io/${{ github.repository }}:${{ matrix.node }}" if [ "${{ matrix.node }}" == "${{ env.NODE_LATEST }}" ]; then - TAGS="$TAGS,ghcr.io/${{ github.repository }}:latest$SUFFIX" + TAGS="$TAGS,ghcr.io/${{ github.repository }}:latest" fi echo "current tags $TAGS" diff --git a/Dockerfile b/Dockerfile index 43c107d..2402ed0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=16 +ARG NODE_VERSION=18 FROM node:${NODE_VERSION}-alpine AS build