Skip to content
This repository was archived by the owner on Nov 24, 2021. It is now read-only.

Commit 7404475

Browse files
authored
Merge pull request #7 from covid-modeling/gorzell/codespace
codespace: Add Codespace configuration.
2 parents f2c43dc + b9394b2 commit 7404475

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node:buster
2+
3+
ARG USERNAME=node
4+
ARG USER_UID=1000
5+
ARG USER_GID=$USER_UID
6+
7+
RUN apt-get update \
8+
&& apt-get install --no-install-recommends -y sudo \
9+
&& apt-get clean -y \
10+
&& apt-get autoremove -y \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
14+
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
15+
groupmod --gid $USER_GID $USERNAME \
16+
&& usermod --uid $USER_UID --gid $USER_GID $USERNAME \
17+
&& chown -R $USER_UID:$USER_GID /home/$USERNAME; \
18+
fi
19+
20+
RUN npm install -g eslint lerna typescript \
21+
&& curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
22+
&& chmod +x /usr/local/bin/docker-compose

.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/vscode-remote/devcontainer.json or this file's README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.116.0/containers/typescript-node-12
3+
{
4+
"name": "Model Runner Codespace",
5+
"dockerFile": "Dockerfile",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": {
9+
"terminal.integrated.shell.linux": "/bin/bash"
10+
},
11+
12+
// Add the IDs of extensions you want installed when the container is created.
13+
"extensions": [
14+
"dbaeumer.vscode-eslint",
15+
"github.vscode-pull-request-github",
16+
"ms-azuretools.vscode-docker",
17+
"ms-vscode.vscode-typescript-tslint-plugin",
18+
"streetsidesoftware.code-spell-checker",
19+
"visualstudioexptteam.vscodeintellicode"
20+
],
21+
22+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23+
// "forwardPorts": [],
24+
25+
// "remoteUser": "node",
26+
"postCreateCommand": "lerna bootstrap"
27+
}

0 commit comments

Comments
 (0)