Skip to content

Commit

Permalink
Merge pull request #120 from twocolors/master
Browse files Browse the repository at this point in the history
update node version to 18 , support run docker on port 80 or 443
  • Loading branch information
gfwilliams authored Apr 23, 2024
2 parents ba31a1c + 3594911 commit 7920af3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=16
ARG NODE_VERSION=18

FROM node:${NODE_VERSION}-alpine AS build

Expand All @@ -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

Expand Down

0 comments on commit 7920af3

Please sign in to comment.