Files
s41r4j-cve-2025-48384/Dockerfile.source
T

39 lines
891 B
Docker

FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
ARG GIT_VERSION=2.47.2
# Build deps for Git from source
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
curl \
tar \
xz-utils \
zlib1g-dev \
libssl-dev \
libcurl4-openssl-dev \
libexpat1-dev \
gettext \
tzdata \
&& rm -rf /var/lib/apt/lists/*
# Fetch and build Git
WORKDIR /tmp
RUN set -eux; \
curl -fsSL -o git.tar.xz "https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.xz"; \
tar -xf git.tar.xz; \
cd git-${GIT_VERSION}; \
./configure --prefix=/usr/local; \
make -j"$(nproc)"; \
make install; \
git --version
# Create unprivileged user
RUN id -u ctfuser >/dev/null 2>&1 || useradd -m ctfuser
USER ctfuser
WORKDIR /home/ctfuser
CMD ["/bin/bash"]