Skip to content

Commit

Permalink
.devcontainer: Pretend bazelisk is bazel inside devcontainers, to fix…
Browse files Browse the repository at this point in the history
… vscode extensions that expect bazel. (part 2)
  • Loading branch information
ivucica authored Apr 30, 2024
1 parent 0768e24 commit cc845dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ RUN curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends gettext clang gcc bzip2 libx11-dev libxext-dev libxrandr-dev libxrender-dev libgl-dev libglu-dev libasound-dev libalsaplayer-dev patch clangd \
&& apt-get -y install --no-install-recommends libsdl1.2-dev libsdl-gfx1.2-dev libgmp3-dev autoconf automake libgl1-mesa-dev libglu1-mesa-dev

# Pretend Bazelisk is Bazel for sake of VSCode extensions that might be tricky
# to reconfigure to understand Bazelisk is a decent intermediary.
RUN ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo apt update && sudo apt install --yes gettext clang gcc bzip2 libx11-dev libxext-dev libxrandr-dev libxrender-dev libgl-dev libglu-dev libasound-dev libalsaplayer-dev patch clangd && sudo apt install --yes libsdl1.2-dev libsdl-gfx1.2-dev libgmp3-dev autoconf automake libgl1-mesa-dev libglu1-mesa-dev && git submodule update --init && ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel",
"postCreateCommand": "sudo apt update && sudo apt install --yes gettext clang gcc bzip2 libx11-dev libxext-dev libxrandr-dev libxrender-dev libgl-dev libglu-dev libasound-dev libalsaplayer-dev patch clangd && sudo apt install --yes libsdl1.2-dev libsdl-gfx1.2-dev libgmp3-dev autoconf automake libgl1-mesa-dev libglu1-mesa-dev && git submodule update --init && ln -sf /usr/local/bin/bazelisk /usr/local/bin/bazel",
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
Expand Down

0 comments on commit cc845dc

Please sign in to comment.