From 6c86b2bb4009f392827ef17e554992db5b1a2df8 Mon Sep 17 00:00:00 2001 From: halvorbmundal Date: Wed, 17 Apr 2024 10:23:02 +0200 Subject: [PATCH] Bruk node 20. Endre til nonroot i dockerfile (#1746) * Bruk :nonroot. Sett Workdir til /app (cherry picked from commit cdb1f485eb3ac32d0b9e8c1f5772115ca2a9e7b9) * Bruk node 20 i github actions (cherry picked from commit d51e6bed64dff61d5e16191e20f6546d2d30ddb4) --- .github/workflows/build.yaml | 2 +- .github/workflows/build_n_deploy_dev.yaml | 2 +- .github/workflows/build_n_deploy_prod.yaml | 2 +- Dockerfile | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0588384e..b6f55712 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' cache: yarn registry-url: "https://npm.pkg.github.com" - name: Yarn install diff --git a/.github/workflows/build_n_deploy_dev.yaml b/.github/workflows/build_n_deploy_dev.yaml index dcd7b2e3..f3e4d557 100644 --- a/.github/workflows/build_n_deploy_dev.yaml +++ b/.github/workflows/build_n_deploy_dev.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' cache: yarn registry-url: "https://npm.pkg.github.com" - name: Yarn install diff --git a/.github/workflows/build_n_deploy_prod.yaml b/.github/workflows/build_n_deploy_prod.yaml index 52a45226..fb6e74d4 100644 --- a/.github/workflows/build_n_deploy_prod.yaml +++ b/.github/workflows/build_n_deploy_prod.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' cache: yarn registry-url: "https://npm.pkg.github.com" - name: Yarn install diff --git a/Dockerfile b/Dockerfile index e3f61e4c..ddfa3db4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM gcr.io/distroless/nodejs20-debian12 +FROM gcr.io/distroless/nodejs20-debian12:nonroot +WORKDIR /app COPY assets ./assets COPY node_dist ./node_dist