File tree Expand file tree Collapse file tree
docker/react_ui_devcontainer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ COPY --chmod=+x files/usr/local/bin/claude /usr/local/bin/claude
9898COPY --chmod=+x files/usr/local/bin/opencode /usr/local/bin/opencode
9999COPY --chmod=+x files/usr/local/bin/docker-entrypoint /usr/local/bin/docker-entrypoint
100100COPY --chmod=+x files/home/$USERNAME/shell-init.sh ${HOME}/shell-init.sh
101+ COPY --chmod=+x files/home/$USERNAME/shell-init.fish ${HOME}/shell-init.fish
101102
102103# Wrapper scripts that execute commands inside the appropriate Docker containers.
103104# These scripts use Docker-from-Docker to run the commands in the context of the
@@ -113,9 +114,9 @@ RUN mkdir -p $HOME/.config/fish && \
113114 echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.bashrc && \
114115 echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.zshrc && \
115116 echo 'set -gx PATH /usr/local/bin $PATH' >> $HOME/.config/fish/config.fish && \
116- echo '$HOME/shell-init.sh' >> $HOME/.bashrc && \
117- echo '$HOME/shell-init.sh' >> $HOME/.zshrc && \
118- echo '$HOME/shell-init.sh ' >> $HOME/.config/fish/config.fish
117+ echo '. $HOME/shell-init.sh' >> $HOME/.bashrc && \
118+ echo '. $HOME/shell-init.sh' >> $HOME/.zshrc && \
119+ echo 'source $HOME/shell-init.fish ' >> $HOME/.config/fish/config.fish
119120
120121# Set the default working directory when starting a container from this image
121122WORKDIR /workspace
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env fish
2+
3+ # 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.
8+ if test " $BLOCK_SSH_AUTH_SOCK " = " true"
9+ # Disable SSH agent forwarding for the current shell session
10+ set -gx SSH_AUTH_SOCK /dev/null
11+ # Remove any existing SSH agent socket files created by VS Code
12+ find /tmp -maxdepth 1 -name ' vscode-ssh-auth-*.sock' -delete 2> /dev/null
13+ end
You can’t perform that action at this time.
0 commit comments