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 c8c906e..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 @@ -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