* Installs clang-13, g++-11, and dotnet7 * Sets up ccache symlinks for compilers to speed up repeated builds
109 lines
3.0 KiB
Docker
109 lines
3.0 KiB
Docker
FROM ubuntu:22.10
|
|
|
|
RUN \
|
|
apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
clang-13 \
|
|
clang-format-13 \
|
|
clangd-13 \
|
|
clang-15 \
|
|
clang-format-15 \
|
|
clangd-15 \
|
|
cmake \
|
|
curl \
|
|
dotnet7 \
|
|
fish \
|
|
g++-11 \
|
|
g++-12 \
|
|
gnupg \
|
|
liblttng-ust-dev \
|
|
libssh2-1-dev \
|
|
libpcap0.8-dev \
|
|
locales \
|
|
ninja-build \
|
|
nodejs \
|
|
npm \
|
|
openssh-server \
|
|
python3-pip \
|
|
python3-venv \
|
|
rapidjson-dev \
|
|
software-properties-common \
|
|
sqlite3 \
|
|
sudo \
|
|
tar \
|
|
vim \
|
|
wget
|
|
|
|
# this is done here so that ccache sees clang++ installed, not clang-10
|
|
RUN \
|
|
apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y ccache
|
|
|
|
# emumba deps
|
|
RUN \
|
|
apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
tzdata \
|
|
build-essential \
|
|
cmake-curses-gui \
|
|
git-all \
|
|
doxygen \
|
|
python3-sphinx \
|
|
graphviz \
|
|
libgtest-dev \
|
|
libssl-dev \
|
|
libboost-filesystem-dev \
|
|
libboost-program-options-dev \
|
|
libboost-test-dev \
|
|
libboost-date-time-dev \
|
|
zlib1g-dev \
|
|
netcat-traditional \
|
|
net-tools \
|
|
gdb gdbserver \
|
|
pkg-config
|
|
|
|
# set up default executables (update-alternatives)
|
|
RUN \
|
|
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 100; \
|
|
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100; \
|
|
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 100; \
|
|
update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-13 100; \
|
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100; \
|
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
|
|
|
|
# Add compiler symlinks for ccache
|
|
RUN \
|
|
ln -s /usr/bin/ccache /usr/local/bin/clang; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/clang++; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/clang-13; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/clang++-13; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/clang-15; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/clang++-15; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/gcc; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/g++; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/gcc-11; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/g++-11; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/gcc-12; \
|
|
ln -s /usr/bin/ccache /usr/local/bin/g++-12
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
|
|
ARG docker_user
|
|
ARG docker_password
|
|
|
|
RUN \
|
|
useradd -m $docker_user \
|
|
&& echo "${docker_user}:${docker_password}" | chpasswd \
|
|
&& adduser $docker_user sudo
|
|
|
|
RUN USER=$docker_user && \
|
|
GROUP=$docker_user && \
|
|
curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.5.1/fixuid-0.5.1-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \
|
|
chown root:root /usr/local/bin/fixuid && \
|
|
chmod 4755 /usr/local/bin/fixuid && \
|
|
mkdir -p /etc/fixuid && \
|
|
printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml
|
|
|
|
USER $docker_user:$docker_user
|
|
ENTRYPOINT ["fixuid"]
|