Skip to content

Commit 255aabf

Browse files
authored
feat: add python with node (#23)
1 parent df784e9 commit 255aabf

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

3.13/node/Dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# tags=articulate/python:3.13-node
2+
# syntax=docker/dockerfile:1
3+
FROM python:3.13-slim-bookworm
4+
5+
ENV SERVICE_ROOT=/service SERVICE_USER=service SERVICE_UID=1001
6+
7+
ARG TARGETARCH
8+
9+
ADD --chmod=755 https://raw.githubusercontent.com/articulate/docker-bootstrap/main/scripts/install_packages /usr/local/bin/install_packages
10+
ADD --chmod=755 https://raw.githubusercontent.com/articulate/docker-bootstrap/main/scripts/awscli.sh /tmp/awscli.sh
11+
# Add AWS RDS CA trusted root certificates
12+
ADD --chmod=644 https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /usr/local/share/ca-certificates/aws-rds-global-bundle.pem
13+
14+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
15+
RUN install_packages make dumb-init ca-certificates && /tmp/awscli.sh && rm /tmp/awscli.sh \
16+
# Install Node.js
17+
&& install_packages curl gnupg \
18+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
19+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
20+
&& install_packages nodejs \
21+
&& apt-get remove -y curl gnupg \
22+
# Create our own user and remove the node user
23+
&& groupadd --gid $SERVICE_UID $SERVICE_USER \
24+
&& useradd --create-home --shell /bin/bash --gid $SERVICE_UID --uid $SERVICE_UID $SERVICE_USER \
25+
# Split PEM bundle into individual cert files for update-ca-certificates
26+
&& csplit -s -z -n 3 -f /usr/local/share/ca-certificates/aws-rds-ca- \
27+
/usr/local/share/ca-certificates/aws-rds-global-bundle.pem \
28+
'/-----BEGIN CERTIFICATE-----/' '{*}' \
29+
&& for f in /usr/local/share/ca-certificates/aws-rds-ca-*; do mv "$f" "$f.crt"; done \
30+
&& update-ca-certificates
31+
32+
ADD --chmod=755 https://github.com/articulate/docker-bootstrap/releases/latest/download/docker-bootstrap_linux_${TARGETARCH} /entrypoint
33+
ADD --chmod=755 https://raw.githubusercontent.com/articulate/docker-bootstrap/main/scripts/docker-secrets /usr/local/bin/secrets
34+
ADD --chmod=755 https://raw.githubusercontent.com/vishnubob/wait-for-it/81b1373f17855a4dc21156cfe1694c31d7d1792e/wait-for-it.sh /wait-for-it.sh
35+
36+
USER $SERVICE_USER
37+
WORKDIR $SERVICE_ROOT
38+
39+
# Our entrypoint will pull in our environment variables from Consul and Vault,
40+
# and execute whatever command we provided the container.
41+
# See https://github.com/articulate/docker-bootstrap
42+
ENTRYPOINT [ "dumb-init", "--", "/entrypoint" ]
43+

0 commit comments

Comments
 (0)