Update Dockerfile
This commit is contained in:
parent
714cdf7c96
commit
56526f1e52
2 changed files with 17 additions and 28 deletions
17
ci/Dockerfile.ci-git-node-podman
Normal file
17
ci/Dockerfile.ci-git-node-podman
Normal file
|
@ -0,0 +1,17 @@
|
|||
FROM alpine:3.20
|
||||
|
||||
# Node 20 + git + podman + tini + bash
|
||||
RUN apk add --no-cache nodejs-current npm git podman ca-certificates tini bash
|
||||
|
||||
# Non-root user 1001:1001 to match your setup
|
||||
RUN addgroup -g 1001 ci \
|
||||
&& adduser -D -u 1001 -G ci -h /home/ci ci \
|
||||
&& mkdir -p /home/ci/.config && chown -R 1001:1001 /home/ci
|
||||
|
||||
ENV HOME=/home/ci SHELL=/bin/bash
|
||||
USER 1001:1001
|
||||
WORKDIR /workspace
|
||||
|
||||
ENTRYPOINT ["/sbin/tini","--"]
|
||||
CMD ["tail","-f","/dev/null"]
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
FROM node:20-bookworm-slim
|
||||
|
||||
# Basics your CI uses
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends ca-certificates curl git jq; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install the Podman **remote** client and expose it as "podman"
|
||||
ARG PODMAN_REMOTE_VERSION=5.2.3
|
||||
RUN set -eux; \
|
||||
arch="$(dpkg --print-architecture)"; \
|
||||
case "$arch" in amd64) goarch=amd64;; arm64) goarch=arm64;; *) echo "unsupported arch: $arch"; exit 1;; esac; \
|
||||
url="https://github.com/containers/podman/releases/download/v${PODMAN_REMOTE_VERSION}/podman-remote-static-linux_${goarch}.tar.gz"; \
|
||||
curl -fsSL -o /tmp/podman-remote.tgz "$url"; \
|
||||
mkdir -p /tmp/podman-remote; \
|
||||
tar -xzf /tmp/podman-remote.tgz -C /tmp/podman-remote; \
|
||||
cand="/tmp/podman-remote/bin/podman-remote-static-linux_${goarch}"; \
|
||||
if [ ! -f "$cand" ]; then cand="$(find /tmp/podman-remote -type f -name 'podman*' -print -quit)"; fi; \
|
||||
test -f "$cand"; \
|
||||
install -m0755 "$cand" /usr/local/bin/podman-remote; \
|
||||
ln -sf /usr/local/bin/podman-remote /usr/local/bin/podman; \
|
||||
/usr/local/bin/podman --version; \
|
||||
rm -rf /tmp/podman-remote /tmp/podman-remote.tgz
|
||||
|
||||
# Defaults for your runner’s rootless socket
|
||||
ENV XDG_RUNTIME_DIR=/run/user/999
|
||||
ENV CONTAINER_HOST=unix:///run/user/999/podman/podman.sock
|
Loading…
Add table
Reference in a new issue