Skip to content

Commit

Permalink
feat(lambda): add Node 22 image (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasadrianof authored Dec 3, 2024
1 parent 3db30d4 commit c462157
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions 22/lambda/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# tags=articulate/node:22-lambda
# 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

ARG TARGETARCH

RUN dnf -y install make zip shadow-utils \
# Add service user
&& /usr/sbin/groupadd --gid $SERVICE_UID $SERVICE_USER \
&& /usr/sbin/useradd --create-home --shell /bin/bash --uid $SERVICE_UID --gid $SERVICE_UID $SERVICE_USER \
# Install yarn
&& npm install --global yarn@1.22.19 \
# clean up
&& dnf -y remove shadow-utils \
&& dnf clean all \
&& npm cache clean --force

ADD --chmod=755 https://github.com/articulate/docker-bootstrap/releases/latest/download/docker-bootstrap_linux_${TARGETARCH} /entrypoint
ADD --chmod=755 https://raw.githubusercontent.com/articulate/docker-bootstrap/main/scripts/docker-secrets /usr/local/bin/secrets

USER $SERVICE_USER
WORKDIR $SERVICE_ROOT

# Our entrypoint will pull in our environment variables from Consul and Vault,
# and execute whatever command we provided the container.
# See https://github.com/articulate/docker-bootstrap
ENTRYPOINT [ "/entrypoint" ]

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Base Node.js Docker images.
> 🌟 recommended image
* __articulate/node:22__ 🌟
* articulate/node:22-lambda
* __articulate/node:20__ 🌟
* articulate/node:20-lambda
* articulate/node:18
Expand Down

0 comments on commit c462157

Please sign in to comment.