Skip to content

Commit

Permalink
Merge pull request #116 from articulate/feature/node-20-lambda
Browse files Browse the repository at this point in the history
feat(20): add lambda image
  • Loading branch information
mloberg authored Nov 13, 2023
2 parents 1b3ad41 + 1c924e4 commit d9f78da
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# New Image Checklist

If you're adding a new image, make sure you have done the following:

* [ ] Ensure Dockerfile has a `# tag=` comment with the correct tag(s)
* [ ] Tag is added to README.md
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # [email protected]
with:
dockerfile: ${{ matrix.dockerfile }}
ignore: DL3008,DL3016,DL3033
ignore: DL3008,DL3016,DL3033,DL3041
32 changes: 32 additions & 0 deletions 20/lambda/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# tags=articulate/node:20-lambda
# 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

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 [email protected] \
# 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" ]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Base Node.js Docker images.

> 🌟 recommended image
* articulate/node:20
* __articulate/node:18__ 🌟
* __articulate/node:20__ 🌟
* articulate/node:20-lambda
* articulate/node:18
* articulate/node:18-lambda
* articulate/articulate-node:18-bullseye-slim
* articulate/articulate-node:18-lambda
Expand Down

0 comments on commit d9f78da

Please sign in to comment.