142 lines
4.1 KiB
Docker
142 lines
4.1 KiB
Docker
FROM ubuntu:latest
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=America/New_York
|
|
|
|
# light deps (should be quick to download/install)
|
|
RUN apt-get update && apt-get install -y \
|
|
ca-certificates \
|
|
curl \
|
|
gnupg \
|
|
liblttng-ust-dev \
|
|
libpcap0.8-dev \
|
|
locales \
|
|
ninja-build \
|
|
software-properties-common \
|
|
sqlite3 \
|
|
tzdata
|
|
|
|
# clang
|
|
RUN apt-get update && apt-get install -y \
|
|
clang-13 \
|
|
clang-format-13 \
|
|
clangd-13 \
|
|
clang-15 \
|
|
clang-format-15 \
|
|
clangd-15
|
|
|
|
# g++
|
|
RUN apt-get update && apt-get install -y \
|
|
g++-11 \
|
|
g++-12
|
|
|
|
# python
|
|
RUN apt-get update && apt-get install -y \
|
|
python3-pip \
|
|
python3-venv \
|
|
&& python3 -m pip install --upgrade pip
|
|
|
|
# dotnet
|
|
RUN apt-get update && apt-get install -y \
|
|
dotnet7
|
|
|
|
# ssh
|
|
RUN apt-get update && apt-get install -y \
|
|
libssh2-1-dev \
|
|
openssh-server
|
|
|
|
# cmake
|
|
RUN \
|
|
curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc 2> /dev/null \
|
|
| gpg --dearmor - \
|
|
| tee /usr/share/keyrings/kitware-archive-keyring.gpg > /dev/null \
|
|
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" \
|
|
| tee /etc/apt/sources.list.d/kitware.list > /dev/null \
|
|
&& apt-get update \
|
|
&& rm /usr/share/keyrings/kitware-archive-keyring.gpg \
|
|
&& apt-get install -y kitware-archive-keyring \
|
|
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs)-rc main" \
|
|
| tee -a /etc/apt/sources.list.d/kitware.list >/dev/null \
|
|
&& apt-get install -y cmake
|
|
|
|
# node
|
|
ARG node_major=18
|
|
RUN mkdir -p /etc/apt/keyrings \
|
|
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
|
|
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
|
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_major.x nodistro main" \
|
|
| tee /etc/apt/sources.list.d/nodesource.list \
|
|
&& apt-get update \
|
|
&& apt-get install -y nodejs
|
|
|
|
# ccache is done here so that ccache sees clang++ installed, not clang-10
|
|
RUN apt-get update && apt-get install -y \
|
|
ccache
|
|
|
|
# emumba (light deps)
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
doxygen \
|
|
python3-sphinx \
|
|
graphviz \
|
|
libgtest-dev \
|
|
libssl-dev \
|
|
rapidjson-dev \
|
|
zlib1g-dev \
|
|
pkg-config
|
|
|
|
# emumba (boost)
|
|
RUN apt-get update && apt-get install -y \
|
|
libboost-filesystem-dev \
|
|
libboost-program-options-dev \
|
|
libboost-test-dev \
|
|
libboost-date-time-dev
|
|
|
|
# dev utils
|
|
RUN apt-get update && apt-get install -y \
|
|
fish \
|
|
git-all \
|
|
sudo \
|
|
vim \
|
|
wget
|
|
|
|
# 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="bts"
|
|
ARG docker_uid="1000"
|
|
ARG docker_pass="bts"
|
|
|
|
RUN \
|
|
groupadd -g "$docker_uid" "$docker_user" \
|
|
&& useradd \
|
|
-m \
|
|
-u "$docker_uid" \
|
|
-g "$docker_uid" \
|
|
-G sudo \
|
|
--password "$(openssl passwd -1 "$docker_pass")" \
|
|
"$docker_user"
|