forked from lewissbaker/cppcoro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (46 loc) · 1.83 KB
/
Copy pathDockerfile
File metadata and controls
56 lines (46 loc) · 1.83 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
# https://github.com/devcontainers/templates/tree/main/src/cpp
# https://mcr.microsoft.com/v2/devcontainers/cpp/tags/list
ARG PATCH=1.0.4
ARG VERSION=22.04
FROM mcr.microsoft.com/devcontainers/cpp:${PATCH}-ubuntu-${VERSION}
ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.27.7"
# Optionally install the cmake for vcpkg
COPY ./reinstall-cmake.sh /tmp/
RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
fi \
&& rm -f /tmp/reinstall-cmake.sh
# [Optional] Uncomment this section to install additional vcpkg ports.
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# dev
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
gcc-12 g++-12 clang-15 \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
# tools
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
cmake-format \
dialog \
expect \
feh \
file \
fish \
hwinfo \
mc \
netpbm \
scrot \
shellcheck \
tree \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
ARG SCRIPTS_DIR=/tmp/scripts
COPY scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/apt/install_base.bash \
&& $SCRIPTS_DIR/config/config_system.bash
# gdb pretty printers
USER vscode
RUN cp $SCRIPTS_DIR/gdb/.gdbinit /home/vscode/.gdbinit