Skip to content

Commit

Permalink
do not use special user
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Nov 3, 2023
1 parent 3e524ed commit 6b89d94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Main
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, synchronize]

jobs:
test:
test_github_action:
container: node:20.9.0@sha256:62efd17e997bc843aefa4c003ed84f43dfac83fa6228c57c898482e50a02e45c
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ RUN true \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

# Do not use root to run the app
USER node
# We need to use the root
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem
# USER node

WORKDIR /app

COPY --from=tmp --chown=node:node /app/tmp /app
COPY --from=tmp /app/tmp /app

EXPOSE 8080

Expand Down

0 comments on commit 6b89d94

Please sign in to comment.