chore: remove jekyll and bundler install
All checks were successful
Build Docker Image / build-docker (push) Successful in 1m15s
All checks were successful
Build Docker Image / build-docker (push) Successful in 1m15s
This commit is contained in:
85
Dockerfile
85
Dockerfile
@ -1,61 +1,48 @@
|
|||||||
# ==============================
|
##############################
|
||||||
# Stage 1: Builder
|
# Stage 1: Builder
|
||||||
# ==============================
|
##############################
|
||||||
FROM debian:trixie-slim@sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb AS builder
|
FROM debian:trixie-slim AS builder
|
||||||
|
|
||||||
# Set environment variables for noninteractive install
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
|
||||||
LANG=C.UTF-8
|
|
||||||
|
|
||||||
# Install build and runtime dependencies
|
# Install build dependencies
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
python3 python3-venv build-essential \
|
build-essential \
|
||||||
curl git bash openssh-client \
|
curl \
|
||||||
ruby-full zlib1g-dev libffi-dev libssl-dev ca-certificates \
|
ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
python3 \
|
||||||
|
python3-venv \
|
||||||
# Install Node.js 22 (latest patch for 22.x)
|
python3-pip \
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
ruby-full \
|
||||||
&& apt-get install -y nodejs \
|
|
||||||
&& npm install -g npm \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Install Ruby gems: Jekyll and Bundler
|
|
||||||
RUN gem install bundler jekyll
|
|
||||||
|
|
||||||
# Create Python virtual environment for Ansible
|
|
||||||
RUN python3 -m venv /opt/venv \
|
|
||||||
&& /opt/venv/bin/pip install --no-cache-dir --upgrade pip ansible==8.*
|
|
||||||
|
|
||||||
# ==============================
|
|
||||||
# Stage 2: Runtime
|
|
||||||
# ==============================
|
|
||||||
FROM debian:trixie-slim@sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb
|
|
||||||
|
|
||||||
# Set environment variables
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
|
||||||
LANG=C.UTF-8 \
|
|
||||||
PATH=/usr/local/bundle/bin:/opt/venv/bin:$PATH
|
|
||||||
|
|
||||||
# Install minimal runtime dependencies
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
python3 python3-venv \
|
|
||||||
curl git bash openssh-client \
|
|
||||||
ruby-full ca-certificates \
|
|
||||||
nodejs \
|
nodejs \
|
||||||
|
git \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create a Python virtual environment (example usage)
|
||||||
|
RUN python3 -m venv /opt/venv
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Stage 2: Runtime
|
||||||
|
##############################
|
||||||
|
FROM debian:trixie-slim
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install only runtime dependencies
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
python3 \
|
||||||
|
ruby-full \
|
||||||
|
nodejs \
|
||||||
|
git \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy built tools from builder
|
# Copy built tools from builder
|
||||||
COPY --from=builder /opt/venv /opt/venv
|
COPY --from=builder /opt/venv /opt/venv
|
||||||
COPY --from=builder /usr/local/bundle /usr/local/bundle
|
|
||||||
COPY --from=builder /usr/lib/node_modules /usr/lib/node_modules
|
|
||||||
COPY --from=builder /usr/bin/node /usr/bin/node
|
|
||||||
|
|
||||||
# Create workspace
|
# Set Python virtual environment path
|
||||||
|
ENV PATH="/opt/venv/bin:$PATH"
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
||||||
# Default shell
|
CMD ["bash"]
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
# Expose environment for scripts
|
|
||||||
ENV PATH="/opt/venv/bin:/usr/local/bundle/bin:$PATH"
|
|
||||||
|
Reference in New Issue
Block a user