-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (30 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
36 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:noble
run <<END
export DEBIAN_FRONTEND="noninteractive"
apt-get -q update
apt-get dist-upgrade -y --no-install-recommends --auto-remove
apt-get install -y --no-install-recommends --auto-remove \
build-essential libtool g++ gcc rubygems \
texinfo curl wget automake autoconf python3 python3-dev git \
unzip virtualenvwrapper sudo subversion ca-certificates
apt-get -q clean
rm -rf /var/lib/apt/lists/*
END
RUN sed -i -e "s/Types: deb/Types: deb deb-src/g" /etc/apt/sources.list.d/ubuntu.sources
RUN userdel -f -r ubuntu; useradd -m ctf
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
USER ctf
WORKDIR /home/ctf/tools
ADD --chown=ctf:ctf bin/manage-tools /home/ctf/tools/bin/manage-tools
RUN bin/manage-tools -s setup
ADD --chown=ctf:ctf .git /home/ctf/tools/.git
RUN git checkout .
ARG PREINSTALL=""
RUN <<END
for TOOL in $PREINSTALL
do
/home/ctf/tools/bin/manage-tools -s -v install $TOOL
done
END
ENV PATH=/home/ctf/tools/bin:/bin:/sbin
WORKDIR /home/ctf