Skip to content

Commit d25ff76

Browse files
🐳 fix: Update .devcontainer Files (danny-avila#1712)
* fix: modify the base docker image for devcontainer * fix: restore package-lock.json from main
1 parent 335980a commit d25ff76

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.devcontainer/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM node:18-bullseye
2+
3+
RUN useradd -m -s /bin/bash vscode
4+
RUN mkdir -p /workspaces && chown -R vscode:vscode /workspaces
5+
WORKDIR /workspaces

.devcontainer/devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
}
1414
},
1515
"postCreateCommand": "",
16-
"features": { "ghcr.io/devcontainers/features/git:1": {} }
16+
"features": { "ghcr.io/devcontainers/features/git:1": {} },
17+
"remoteUser": "vscode"
1718
}

.devcontainer/docker-compose.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ version: "3.8"
22

33
services:
44
app:
5-
image: node:19-bullseye
5+
build:
6+
context: ..
7+
dockerfile: .devcontainer/Dockerfile
68
# restart: always
79
links:
810
- mongodb
@@ -30,8 +32,8 @@ services:
3032
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
3133
# (Adding the "ports" property to this file will not forward from a Codespace.)
3234

33-
# Uncomment the next line to use a non-root user for all processes - See https://aka.ms/vscode-remote/containers/non-root for details.
34-
# user: vscode
35+
# Use a non-root user for all processes - See https://aka.ms/vscode-remote/containers/non-root for details.
36+
user: vscode
3537

3638
# Overrides default command so things don't shut down after the process ends.
3739
command: /bin/sh -c "while sleep 1000; do :; done"

0 commit comments

Comments
 (0)