Skip to content

Commit

Permalink
🐳 fix: Update .devcontainer Files (danny-avila#1712)
Browse files Browse the repository at this point in the history
* fix: modify the base docker image for devcontainer

* fix: restore package-lock.json from main
  • Loading branch information
ryohei-kamiya authored Feb 4, 2024
1 parent 97a88a2 commit 2ea2b14
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:18-bullseye

RUN useradd -m -s /bin/bash vscode
RUN mkdir -p /workspaces && chown -R vscode:vscode /workspaces
WORKDIR /workspaces
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
}
},
"postCreateCommand": "",
"features": { "ghcr.io/devcontainers/features/git:1": {} }
"features": { "ghcr.io/devcontainers/features/git:1": {} },
"remoteUser": "vscode"
}
8 changes: 5 additions & 3 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ version: "3.8"

services:
app:
image: node:19-bullseye
build:
context: ..
dockerfile: .devcontainer/Dockerfile
# restart: always
links:
- mongodb
Expand Down Expand Up @@ -30,8 +32,8 @@ services:
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

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

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

0 comments on commit 2ea2b14

Please sign in to comment.