-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopen-dev-console.sh
More file actions
executable file
·29 lines (25 loc) · 903 Bytes
/
open-dev-console.sh
File metadata and controls
executable file
·29 lines (25 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#/bin/sh
CONTAINER_ID="$(docker ps -q -f=name=dev_env)"
if [ -n "$CONTAINER_ID" ]; then
docker exec -it -u 1000:1000 $CONTAINER_ID /bin/bash
else
docker-compose -f .devcontainer/docker-compose.yml \
run --rm -u 1000 --workdir="/app" --service-ports dev /bin/bash
## (Reference) Do the same thing with plain docker command
# docker run -it --rm \
# --name vscode_devcontainer_dev \
# -v $PWD/volume/home/developer:/home/developer \
# -v ~/.gitconfig:/home/developer/.gitconfig \
# -v $PWD/volume/home/build:/home/build \
# -v $PWD/volume/app:/app \
# --workdir="/app" \
# -u 1000:1000 \
# mcr.microsoft.com/dotnet/core/sdk:2.2 \
# /bin/bash
fi
## Usage of developer console
# ex. MVC template
# > dotnet new mvc --language F# --name WebAppMVC --output WebAppMVC
#
# ex. REPL
# > dotnet fsi