Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevContainer fixes #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/.tmux.conf
Expand Up @@ -93,4 +93,4 @@ bind -n S-M-Up resize-pane -Z
bind -n S-M-Down resize-pane -Z

# see file .devcontainer/additional_bashrc for this command's source
set-hook -g session-closed "cleanupBSN"
set-hook -g session-closed "/bin/bash -c cleanupBSN"
2 changes: 2 additions & 0 deletions .devcontainer/additional_bashrc.sh
Expand Up @@ -18,3 +18,5 @@ function cleanupBSN() {
kill $(cat /var/tmp/strategy_manager.pid && rm /var/tmp/strategy_manager.pid) & sleep 1s
kill $(pgrep roscore)
}

export -f cleanupBSN
13 changes: 1 addition & 12 deletions .devcontainer/devcontainer.json
@@ -1,19 +1,8 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
// Sets the run context to one level up instead of the .devcontainer folder.
"name": "SA-BSN",
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../Dockerfile.dev",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created - for example installing curl.
"postCreateCommand": "bash -c \"/workspaces/bsn/.devcontainer/postCreate.sh\""
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
7 changes: 3 additions & 4 deletions .devcontainer/postCreate.sh
@@ -1,4 +1,3 @@
python-rospy
cd /workspaces/bsn &&\
rosdep install --from-paths src --ignore-src -r -y &&\
catkin_make
cd /workspaces/bsn
rosdep install --from-paths src --ignore-src -r -y
catkin_make