Skip to content

Commit 8e51791

Browse files
committed
drop to unprivileged user
1 parent 7b51c5a commit 8e51791

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
7575
with:
7676
context: .
77-
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
77+
platforms: linux/amd64,linux/arm64/v8
7878
push: true
7979
cache-from: type=gha
8080
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ RUN set -ex; \
1818
COPY index.js settings.js ./
1919
COPY views ./views
2020

21+
# Ensure the application directory is owned by an unprivileged user and run as that user
22+
RUN chown -R 1000:1000 /app
23+
24+
USER 1000
25+
2126
CMD ["node", "index.js"]

0 commit comments

Comments
 (0)