Skip to content

Commit 6a3dbc0

Browse files
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! !fixup Introduce devcontainer service container based development environment (#705)
1 parent c12936f commit 6a3dbc0

5 files changed

Lines changed: 12 additions & 0 deletions

File tree

docker/react_ui_devcontainer/files/home/developer/shell-init.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/sh
22

33
# Block SSH agent forwarding if the environment variable `BLOCK_SSH_AUTH_SOCK` is set to "true"
4+
#
5+
# VS Code forwards the SSH agent socket to the dev container by default, so this allows users
6+
# to opt out of that behavior if they want to disable SSH agent forwarding to isolate the dev container.
7+
# JetBrains IDEs forward the SSH agent socket only if allowed by the user.
48
if [ "$BLOCK_SSH_AUTH_SOCK" = "true" ]; then
59
# Disable SSH agent forwarding for the current shell session
610
export SSH_AUTH_SOCK=/dev/null
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/sh
22

3+
# This script is a wrapper around the `mkdocs` command that executes it within the Docker container.
4+
# Docker Socket is owned by root, so we need to use `sudo` to access it.
35
sudo docker compose -p "$COMPOSE_PROJECT_NAME" exec docs mkdocs "$@"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/sh
22

3+
# This script is a wrapper around the `node` command that executes it within the Docker container.
4+
# Docker Socket is owned by root, so we need to use `sudo` to access it.
35
sudo docker compose -p "$COMPOSE_PROJECT_NAME" exec node node "$@"

docker/react_ui_devcontainer/files/usr/local/bin/npm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh
22

3+
# This script is a wrapper around the `npm` command that executes it within the Docker container.
4+
# Docker Socket is owned by root, so we need to use `sudo` to access it.
35
if [ "$1" = "run" ] && echo "$2" | grep -q '^test:playwright'; then
46
sudo docker compose -p "$COMPOSE_PROJECT_NAME" exec playwright npm "$@"
57
else
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/sh
22

3+
# This script is a wrapper around the `npx` command that executes it within the Docker container.
4+
# Docker Socket is owned by root, so we need to use `sudo` to access it.
35
sudo docker compose -p "$COMPOSE_PROJECT_NAME" exec node npx "$@"

0 commit comments

Comments
 (0)