Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(20): add lambda image #116

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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