Skip to content

Commit

Permalink
fix(18-bullseye-slim): pin node to 10 (#125)
Browse files Browse the repository at this point in the history
* fix(18-bullseye-slim): pin node to 10

npm 11 requires Node 20

* refactor: use new ENV format

The old style of ENV key value is deprecated and is now ENV key=value

* ci(github): update CODEOWNERs team
  • Loading branch information
mloberg authored Dec 19, 2024
1 parent c462157 commit eb1b94d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @articulate/devex-sre
* @articulate/devex
2 changes: 1 addition & 1 deletion 18-bullseye-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN apt-get update -qq \
&& useradd --create-home --home $SERVICE_ROOT --shell /bin/bash --gid $SERVICE_UID --uid $SERVICE_UID $SERVICE_USER \
&& userdel -r node \
# Install the latest version of npm
&& npm install -g npm@latest \
&& npm install -g npm@10 \
# Create the node_modules directory, make it owned by service user
&& mkdir -p $NODE_MODULES_PATH && chown $SERVICE_USER:$SERVICE_USER $NODE_MODULES_PATH \
# Add node-gyp globally to avoid installation issues attempting to install from a dependency
Expand Down
4 changes: 1 addition & 3 deletions 18/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# syntax=docker/dockerfile:1
FROM node:18-bullseye-slim

ENV SERVICE_ROOT /service
ENV SERVICE_USER service
ENV SERVICE_UID 1001
ENV SERVICE_ROOT=/service SERVICE_USER=service SERVICE_UID=1001

ARG TARGETARCH

Expand Down
5 changes: 1 addition & 4 deletions 18/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# syntax=docker/dockerfile:1
FROM amazon/aws-lambda-nodejs:18

ENV AWS_DEFAULT_REGION us-east-1
ENV SERVICE_ROOT /service
ENV SERVICE_USER service
ENV SERVICE_UID 1001
ENV AWS_DEFAULT_REGION=us-east-1 SERVICE_ROOT=/service SERVICE_USER=service SERVICE_UID=1001

ARG TARGETARCH

Expand Down
5 changes: 1 addition & 4 deletions 20/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# syntax=docker/dockerfile:1
FROM amazon/aws-lambda-nodejs:20

ENV AWS_DEFAULT_REGION us-east-1
ENV SERVICE_ROOT /service
ENV SERVICE_USER service
ENV SERVICE_UID 1001
ENV AWS_DEFAULT_REGION=us-east-1 SERVICE_ROOT=/service SERVICE_USER=service SERVICE_UID=1001

ARG TARGETARCH

Expand Down
6 changes: 1 addition & 5 deletions 22/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# syntax=docker/dockerfile:1
FROM amazon/aws-lambda-nodejs:22

ENV AWS_DEFAULT_REGION us-east-1
ENV SERVICE_ROOT /service
ENV SERVICE_USER service
ENV SERVICE_UID 1001
ENV AWS_DEFAULT_REGION=us-east-1 SERVICE_ROOT=/service SERVICE_USER=service SERVICE_UID=1001

ARG TARGETARCH

Expand All @@ -30,4 +27,3 @@ WORKDIR $SERVICE_ROOT
# and execute whatever command we provided the container.
# See https://github.com/articulate/docker-bootstrap
ENTRYPOINT [ "/entrypoint" ]

0 comments on commit eb1b94d

Please sign in to comment.