-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
101 lines (81 loc) · 2.14 KB
/
Dockerfile
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
90
91
92
93
94
95
96
97
98
99
100
101
FROM ubuntu:22.04
# Set timezone (important for some packages)
ARG TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV HOME=/home
RUN yes | unminimize
# Install packages (break this up into checkpoints if you're having build issues)
# Apt caching from: https://stackoverflow.com/a/72851168
# TODO: could probably remove some of these packages
# --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
# --mount=target=/var/cache/apt,type=cache,sharing=locked \
# rm -f /etc/apt/apt.conf.d/docker-clean \
RUN apt-get install software-properties-common -y \
&& add-apt-repository ppa:git-core/ppa \
&& apt-get update
# TERMINAL UTILITIES
RUN apt-get install -y \
curl \
tmux \
vim \
wget \
sudo \
fzf \
openssh-server \
man \
file \
rsync \
tree \
git=1:2.43.2-0ppa1~ubuntu22.04.1
# SHELL FLAVORS
RUN apt-get install -y \
zsh \
fish
# RUST DEPENDENCIES
RUN apt-get install -y \
cargo
# PYTHON DEPENDENCIES
RUN apt-get install -y \
python3 \
python3-pip \
python3-git \
python-is-python3
# C/C++ DEPENDENCIES
RUN apt-get install -y \
binutils \
cgdb \
clang \
clang-format \
clangd \
bear \
mold \
ccache \
cmake \
exuberant-ctags \
g++ \
gcc \
gdb \
gdb-multiarch \
silversearcher-ag \
valgrind \
autoconf \
libglib2.0-dev \
build-essential libgmp3-dev libmpfr-dev libmpc-dev flex bison autogen dejagnu
# CLEAN UP APT GET CACHE
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# GIT CUSTOMIZATION DEPENDENCIES
RUN pip install requests unidiff
RUN useradd --create-home --home-dir /home/workspace --user-group workspace && echo workspace:workspace | chpasswd \
&& chsh -s /bin/bash workspace && echo "workspace ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
WORKDIR ${HOME}
COPY "./home/*" ./
COPY "./home/.config/" ./
# COPY ./install_scripts/. /install_scripts
# WORKDIR /install_scripts
# RUN ./create_group0.sh && ./create_student0.sh && ./install_bochs.sh && ./install_rust.sh && ./squish/install.sh
WORKDIR /
COPY entrypoint.sh .
RUN chown -R workspace:workspace ${HOME}
USER workspace
ENTRYPOINT [ "/entrypoint.sh" ]