Skip to content
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM python:trixie
LABEL org.opencontainers.image.authors="Nikolai R Kristiansen <nikolaik@gmail.com>"

SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
RUN groupadd --gid 1000 pn && useradd --uid 1000 --gid pn --shell /bin/bash --create-home pn
ENV POETRY_HOME=/usr/local

# Install nodejs and yarn
RUN NODE_VERSION="$(curl -fsSL https://nodejs.org/dist/latest/SHASUMS256.txt | head -n1 | awk '{ print $2}' | awk -F - '{ print $2}')" \
ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
Expand All @@ -23,7 +23,7 @@ RUN NODE_VERSION="$(curl -fsSL https://nodejs.org/dist/latest/SHASUMS256.txt | h
&& tar -xJf "node-$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN corepack enable yarn
RUN npm install -g corepack && corepack enable yarn
RUN \
apt-get update && \
apt-get upgrade -yqq && \
Expand Down
4 changes: 3 additions & 1 deletion templates/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# nodejs: {{ nodejs_canonical }}
FROM python:{{ python_image }} AS builder

SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

# Install node prereqs, nodejs and yarn
# Ref: https://raw.githubusercontent.com/nodejs/docker-node/master/Dockerfile-alpine.template
# Ref: https://yarnpkg.com/en/docs/install
Expand All @@ -21,7 +23,7 @@ LABEL org.opencontainers.image.authors="Nikolai R Kristiansen <nikolaik@gmail.co
RUN addgroup -g 1000 pn && adduser -u 1000 -G pn -s /bin/sh -D pn
RUN apk add libstdc++
COPY --from=builder /node-v{{ nodejs_canonical }}-linux-x64-musl /usr/local
RUN corepack enable yarn
RUN npm install -g corepack && corepack enable yarn
RUN pip install -U pip pipenv uv

# Poetry
Expand Down
3 changes: 2 additions & 1 deletion templates/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
FROM python:{{ python_image }}
LABEL org.opencontainers.image.authors="Nikolai R Kristiansen <nikolaik@gmail.com>"

SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
RUN groupadd --gid 1000 pn && useradd --uid 1000 --gid pn --shell /bin/bash --create-home pn
ENV POETRY_HOME=/usr/local

Expand All @@ -29,7 +30,7 @@ RUN NODE_VERSION="v{{ nodejs_canonical }}" \
&& tar -xJf "node-$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN corepack enable yarn
RUN npm install -g corepack && corepack enable yarn

RUN pip install -U pip pipenv uv && \
curl -fsSL --compressed https://install.python-poetry.org | python -