- Created Dockerfile.build with Docker CLI, Buildx, Git, Bash - Updated build-ci-image.sh to build both php-ci and docker-build images - Updated workflow to use docker-build image (no installation needed) - Updated runner .env to use docker-build:latest instead of docker:latest
31 lines
914 B
Docker
31 lines
914 B
Docker
# Dockerfile für Docker Build Jobs in CI/CD
|
|
# Enthält: Docker CLI, Docker Buildx, Git, Bash
|
|
FROM docker:latest
|
|
|
|
# Installiere zusätzliche Tools
|
|
RUN apk add --no-cache \
|
|
git \
|
|
bash \
|
|
curl \
|
|
openssh-client \
|
|
ca-certificates
|
|
|
|
# Installiere Docker Buildx
|
|
RUN mkdir -p /root/.docker/cli-plugins && \
|
|
ARCH=$(uname -m) && \
|
|
if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi && \
|
|
curl -L "https://github.com/docker/buildx/releases/download/v0.13.2/buildx-v0.13.2.linux-${ARCH}" \
|
|
-o /root/.docker/cli-plugins/docker-buildx && \
|
|
chmod +x /root/.docker/cli-plugins/docker-buildx
|
|
|
|
# Verifiziere Installation (Buildx wird beim ersten Aufruf initialisiert, daher nur Basis-Checks)
|
|
RUN docker --version && \
|
|
git --version && \
|
|
bash --version
|
|
|
|
# Arbeitsverzeichnis
|
|
WORKDIR /workspace
|
|
|
|
# Standard-User für CI (UID/GID 1000)
|
|
RUN addgroup -g 1000 ci && adduser -u 1000 -G ci -D ci
|