Skip to content

Commit 9b79536

Browse files
committed
Add devcontainer configuration.
This makes it easy to open the workspace in Ubuntu to reproduce CI issues locally.
1 parent fb1842f commit 9b79536

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/ubuntu/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Ubuntu version: bionic, focal
4+
ARG VARIANT="focal"
5+
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
&& apt-get -y install --no-install-recommends default-jdk gradle maven golang-go \
10+
&& go get github.com/sourcegraph/lsif-semanticdb/cmd/lsif-semanticdb
11+
12+

.devcontainer/devcontainer.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/ubuntu
3+
{
4+
"name": "Ubuntu",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
8+
"args": { "VARIANT": "focal" }
9+
},
10+
11+
// Set *default* container specific settings.json values on container create.
12+
"settings": {
13+
"terminal.integrated.shell.linux": "/bin/bash"
14+
},
15+
16+
// Add the IDs of extensions you want installed when the container is created.
17+
"extensions": [],
18+
19+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
20+
// "forwardPorts": [],
21+
22+
// Use 'postCreateCommand' to run commands after the container is created.
23+
// "postCreateCommand": "uname -a",
24+
25+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
26+
"remoteUser": "vscode"
27+
}

0 commit comments

Comments
 (0)