cpp-devenv-in-docker/cpp-code-server-devenv.Dock...

53 lines
1.3 KiB
Docker

# A Ubuntu based playground for C++ development in a training context.
FROM ubuntu:latest
# Install:
# - some useful tools.
# - a debugger.
# - some compilers.
# - some C++ libraries (boost, google test)
#
RUN apt-get update && apt-get install -y \
curl \
wget \
sudo \
python3 \
build-essential \
gdb \
git \
cmake \
ninja-build \
gcc-14 \
clang \
clangd \
libboost-all-dev \
libgtest-dev \
libgmock-dev
# Install Code-Server (VS Code in the browser)
# TODO: Fix that we are not running random scripts from the web.
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Install some extensions we are going to use
RUN code-server --install-extension ms-python.python && \
code-server --install-extension ms-vscode.cmake-tools && \
code-server --install-extension kylinideteam.cppdebug
WORKDIR /workspace
ADD CMakeLists.txt .
ADD example-executable example-executable
ADD example-library example-library
ADD example-unittest example-unittest
WORKDIR /root
ADD --chmod=544 docker-helper/entrypoint.py .
ADD --chmod=544 docker-helper/entrypoint.sh .
ADD --chmod=444 docker-helper/config.yaml .config/code-server/config.yaml
# Expose port for Code-Server
EXPOSE 8080
# Start Code-Server on container launch
CMD ["/root/entrypoint.sh"]