Skip to content

Commit b90106a

Browse files
author
Sander Valstar
committed
adds devcontainer config
1 parent 83f402c commit b90106a

File tree

4 files changed

+70
-1
lines changed

4 files changed

+70
-1
lines changed

.devcontainer/Dockerfile

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
FROM debian:10
7+
8+
# Avoid warnings by switching to noninteractive
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
11+
# Configure apt and install packages
12+
RUN apt-get update \
13+
&& apt-get -y install --no-install-recommends apt-utils=1.8.2 2>&1 \
14+
#
15+
# Verify git, process tools, lsb-release (useful for CLI installs) installed
16+
&& apt-get -y install git=1:2.20.1-2 procps=2:3.3.15-2 lsb-release=10.2019051400 \
17+
#
18+
# Install C++ tools
19+
&& apt-get -y install build-essential=12.6 cmake=3.13.4-1 cppcheck=1.86-1 valgrind=1:3.14.0-3 \
20+
#
21+
# Install pip
22+
&& apt-get -y install python3-pip=18.1-5 \
23+
#
24+
# Install clang
25+
&& apt-get -y install clang=1:7.0-47 clang-tools=1:7.0-47 clang-tidy=1:7.0-47 clang-format=1:7.0-47 \
26+
#
27+
# Install meson tools
28+
&& pip3 install meson==0.51.1 \
29+
&& pip3 install ninja==1.9.0.post1 \
30+
&& pip3 install lxml==4.3.4 \
31+
#
32+
# Install lcov 1.14-1 (1.13-4 has bug in total no. functions)
33+
&& echo 'deb http://ftp.de.debian.org/debian sid main' >> /etc/apt/sources.list \
34+
&& apt-get update \
35+
&& apt-get -y install lcov=1.14-1 \
36+
#
37+
# Clean up
38+
&& apt-get autoremove -y \
39+
&& apt-get clean -y \
40+
&& rm -rf /var/lib/apt/lists/*
41+
42+
# Switch back to dialog for any ad-hoc use of apt-get
43+
ENV DEBIAN_FRONTEND=dialog

.devcontainer/devcontainer.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "C++",
3+
"extensions": ["ms-vscode.cpptools"],
4+
"settings": {
5+
"terminal.integrated.shell.linux": "/bin/bash"
6+
},
7+
"dockerComposeFile": ["docker-compose.yml"],
8+
"service": "web",
9+
"workspaceFolder": "/Code/meson_test",
10+
"shutdownAction": "stopCompose"
11+
}

.devcontainer/docker-compose.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3"
2+
services:
3+
web:
4+
build:
5+
context: ..
6+
# Location is relative to folder containing this compose file
7+
dockerfile: .devcontainer/Dockerfile
8+
volumes:
9+
- ..:/Code/meson_test
10+
command: sleep infinity
11+
security_opt:
12+
- seccomp:unconfined
13+
cap_add:
14+
- SYS_PTRACE

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ build
44
subprojects/packagecache
55
subprojects/googletest-release-*
66

7-
__pycache__
7+
__pycache__
8+
.DS_Store

0 commit comments

Comments
 (0)