Skip to content

Commit 7920af3

Browse files
authored
Merge pull request #120 from twocolors/master
update node version to 18 , support run docker on port 80 or 443
2 parents ba31a1c + 3594911 commit 7920af3

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/docker-build.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ on:
77
jobs:
88
build:
99
env:
10-
NODE_LATEST: 16
10+
NODE_LATEST: 18
1111
runs-on: ubuntu-latest
1212

1313
strategy:
1414
matrix:
15-
node: [ 14, 16, 18 ]
16-
suffix: [ "" ]
15+
node: [ 16, 18, 20 ]
1716

1817
steps:
1918
- name: 1-checkout
@@ -23,14 +22,9 @@ jobs:
2322
- name: 2-setup-image-setting
2423
id: setting
2524
run: |
26-
SUFFIX=""
27-
if [ "${{ matrix.suffix }}" != "" ]; then
28-
SUFFIX="-${{ matrix.suffix}}"
29-
fi
30-
31-
TAGS="ghcr.io/${{ github.repository }}:${{ matrix.node }}$SUFFIX"
25+
TAGS="ghcr.io/${{ github.repository }}:${{ matrix.node }}"
3226
if [ "${{ matrix.node }}" == "${{ env.NODE_LATEST }}" ]; then
33-
TAGS="$TAGS,ghcr.io/${{ github.repository }}:latest$SUFFIX"
27+
TAGS="$TAGS,ghcr.io/${{ github.repository }}:latest"
3428
fi
3529
3630
echo "current tags $TAGS"

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODE_VERSION=16
1+
ARG NODE_VERSION=18
22

33
FROM node:${NODE_VERSION}-alpine AS build
44

@@ -20,9 +20,11 @@ FROM node:${NODE_VERSION}-alpine
2020
COPY --from=build /app /app
2121

2222
RUN set -x \
23-
&& apk add --no-cache tzdata \
23+
&& apk add --no-cache tzdata libcap \
2424
&& mkdir -p /data \
25-
&& cp /app/config.json /data/config.json
25+
&& cp /app/config.json /data/config.json \
26+
# support port 80/443
27+
&& setcap 'cap_net_bind_service=+ep' `which node`
2628

2729
WORKDIR /app
2830

0 commit comments

Comments
 (0)