Files
debian-latest/Dockerfile
Renovate Bot 521b206994
All checks were successful
Build Docker Image / build-docker (push) Successful in 2m37s
chore(deps): update debian:trixie-slim docker digest to c288011
2025-09-09 01:01:14 +00:00

70 lines
1.7 KiB
Docker

# =========================
# Stage 1: Builder
# =========================
FROM debian:trixie-slim@sha256:c2880112cc5c61e1200c26f106e4123627b49726375eb5846313da9cca117337 AS builder
ENV DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
bash \
openssh-client \
ca-certificates \
procps \
iproute2 \
netcat-traditional \
unzip \
iputils-ping \
python3 \
python3-venv \
build-essential \
zlib1g-dev \
libffi-dev \
libssl-dev \
ruby-full \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 22
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& rm -rf /var/lib/apt/lists/*
# Create Python virtual environment for Ansible
RUN python3 -m venv /opt/venv \
&& /opt/venv/bin/pip install --no-cache-dir --upgrade pip ansible
# =========================
# Stage 2: Final runtime image
# =========================
FROM debian:trixie-slim@sha256:c2880112cc5c61e1200c26f106e4123627b49726375eb5846313da9cca117337
ENV DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \
PATH=/opt/venv/bin:$PATH
# Install runtime dependencies only
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
openssh-client \
ca-certificates \
iputils-ping \
python3 \
python3-venv \
ruby-full \
nodejs \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy built Python venv from builder
COPY --from=builder /opt/venv /opt/venv
# Set working directory
WORKDIR /workspace
# Default shell
SHELL ["/bin/bash", "-c"]