-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (49 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
57 lines (49 loc) · 1.34 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
# ============================================================
# C++ build environment Dockerfile
# ============================================================
# base image
# since alpine does not provide a complete gcc - it is debian
FROM debian:12-slim
LABEL Description="C++ development environment"
# copy premake sources temporarily
ADD submodules/premake-core /premake-core
RUN <<EOF
# install packages
# update
apt-get update
# install function
_install() { apt-get -y --no-install-recommends install "$@"; }
# C++ minimal
_install make g++ uuid-dev
# analysis
_install cloc valgrind cppcheck net-tools
# python latest version
_install python3 python3-pip
apt-get upgrade -y python3
# git (ssh for github / gitlab)
_install git ssh
# maintenance / documentation
_install sudo vim tree
# cleanup
apt-get clean
rm -rf /var/lib/apt/lists/*
# build premake
cd /premake-core
./Bootstrap.sh
# copy premake binary to /usr/bin and make it executable
cp bin/release/premake5 /usr/bin/
chmod +x /usr/bin/premake5
# cleanup premake sources
rm -rf /premake-core
# add user dev
user=dev
home=/home/$user
# create user home directory
mkdir -p $home
# add user, password tt (theoretically never needed)
useradd -ms /bin/bash -d $home -p pacK1Ochismos $user
# sudo without password
echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown -R $user:$user $home
EOF
USER dev