-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (42 loc) · 1.57 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
# Base image: https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ubuntu
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04
# Configurtion: https://pspdfkit.com/blog/2020/visual-studio-code-cpp-docker/
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV DEBIAN_FRONTEND=noninteractive
# Update UID/GID if needed
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
groupmod --gid $USER_GID $USERNAME \
&& usermod --uid $USER_UID --gid $USER_GID $USERNAME \
&& chown -R $USER_UID:$USER_GID /home/$USERNAME; \
fi
# Install tooling for HPC software development
RUN apt-get update && apt-get install -y --no-install-recommends \
# GCC 10.2 with support for C++20 Concepts:
# https://en.cppreference.com/w/cpp/compiler_support
g++-10 \
gdb \
software-properties-common \
# A nice font for VSCode:
# https://blog.programster.org/ubuntu-install-fira-code-font
# https://github.com/tonsky/FiraCode
fonts-firacode \
build-essential \
cmake \
git \
git-lfs \
ninja-build \
ccache \
zsh \
python3-pip
# Cleaning
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Overwriting GCC version: https://askubuntu.com/a/26502
RUN rm /usr/bin/gcc && rm /usr/bin/g++ && ln -s /usr/bin/gcc-10 /usr/bin/gcc && ln -s /usr/bin/g++-10 /usr/bin/g++
RUN pip3 install -U autopep8 conan
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
LABEL org.opencontainers.image.source https://github.com/unumam/docker