-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from articulate/feature/node-20-lambda
feat(20): add lambda image
- Loading branch information
Showing
4 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters