-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
90 lines (74 loc) · 1.7 KB
/
Dockerfile
File metadata and controls
90 lines (74 loc) · 1.7 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM debian:12 AS base
RUN --mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/var/cache \
--mount=type=tmpfs,target=/var/log \
apt-get update && \
apt-get dist-upgrade --yes
FROM base AS build-c
RUN --mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/var/cache \
--mount=type=tmpfs,target=/var/log \
apt-get update && \
apt-get install --yes \
build-essential \
cmake
COPY software/c /build/src
RUN mkdir -p /build/work && \
cd /build/work && \
cmake -DCMAKE_BUILD_TYPE=Release ../src && \
cmake --build . -j$(nproc) && \
cmake --install . --prefix /build/install
FROM base AS final
# Base-Tools:
# - bind9-dnsutils
# - ca-certificates
# - curl
# - gdb
# - htop
# - iputils-ping
# - jq
# - mtr
# - nano
# - netcat-openbsd
# - openssl
# - stunnel
# - sudo
# - traceroute
# - vim
# - wget
# - yq
# - zsh
# tcpdump-port:
# - socat
# - tcpdump
RUN --mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/var/cache \
--mount=type=tmpfs,target=/var/log \
apt-get update && \
apt-get install --yes \
bind9-dnsutils \
ca-certificates \
curl \
gdb \
htop \
iputils-ping \
mtr \
nano \
netcat-openbsd \
openssl \
socat \
stunnel \
sudo \
tcpdump \
traceroute \
vim \
wget \
zsh
# Prepare sudo to allow everything
COPY files/sudoers /etc/sudoers.d/developerimage
# Install Raw Tools
COPY software/raw /
# Install C Tools
COPY --from=build-c /build/install /
# Use ZSH as the default shell
CMD ["/usr/bin/zsh"]