Skip to content

Commit 7150af4

Browse files
Add initial devcontainer
1 parent 6452cc6 commit 7150af4

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
2+
ARG VARIANT=18
3+
FROM mcr.microsoft.com/devcontainers/javascript-node:0-${VARIANT}
4+
5+
RUN su node -c "umask 0002 && npm install -g http-server @vue/cli @vue/cli-service-global"
6+
WORKDIR /app
7+
8+
EXPOSE 8080
9+
10+
# [Optional] Uncomment this section to install additional OS packages.
11+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "VueJS Starter Kit",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
8+
// Configure tool-specific properties.
9+
"customizations": {
10+
// Configure properties specific to VS Code.
11+
"vscode": {
12+
// Add the IDs of extensions you want installed when the container is created.
13+
"extensions": [
14+
"dbaeumer.vscode-eslint",
15+
"Vue.volar",
16+
"Vue.vscode-typescript-vue-plugin"
17+
]
18+
}
19+
},
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
"forwardPorts": [
23+
8080
24+
],
25+
26+
// Use 'postCreateCommand' to run commands after the container is created.
27+
// "postCreateCommand": "uname -a",
28+
29+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
30+
"remoteUser": "node"
31+
}

0 commit comments

Comments
 (0)