Skip to content

Commit

Permalink
Adding VS-Code development container
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple committed Mar 31, 2020
1 parent c08cb4e commit 72d717c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:bionic


ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV LANG en_US.utf8

RUN apt-get update
RUN apt-get update && apt-get install -y locales && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
RUN apt-get -fy install git vim emacs sudo \
apt-utils dialog \
iproute2 procps lsb-release \
build-essential cmake cppcheck valgrind \
make automake g++ libtool llvm-9-dev llvm-9-tools llvm-9 llvm-9-runtime \
curl \
wget \
jq \
clang-9 \
clang-format-9 \
clang-tidy-9 \
lcov \
shellcheck

RUN groupadd --gid $USER_GID $USERNAME
RUN useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
RUN chmod 0440 /etc/sudoers.d/$USERNAME
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "CHIP Ubuntu Development Environment",
"dockerFile": "Dockerfile",
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],

"remoteUser": "vscode",

// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"ms-vscode.cpptools",
"ms-azuretools.vscode-docker",
"xaver.clang-format"
],
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# VS Code Configs
*.vscode
.vscode/*
!.vscode/tasks.json

# Build System
.deps
Expand All @@ -21,6 +22,9 @@ config.status
configure
src/include/BuildConfig.h
src/include/BuildConfig.h.in
libtool
src/include/stamp-h1
Makefile


# Repos stuff
Expand Down
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Main",
"type": "shell",
"command": "make -f Makefile-Standalone",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Bootstrap",
"type": "shell",
"command": "./bootstrap",
"group": "none"
}
]
}

0 comments on commit 72d717c

Please sign in to comment.