Added devcontainers

This commit is contained in:
kidfromjupiter
2026-01-17 18:10:13 +00:00
parent d516d0b3c1
commit eb76c38bb4
5 changed files with 234 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y \
build-essential \
clang \
cmake \
git \
curl \
libsdbus-c++-dev \
libssl-dev \
libsystemd-dev \
libcurlpp-dev \
apt-transport-https \
gnupg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Installing bazel
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg && mv bazel-archive-keyring.gpg /usr/share/keyrings \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
&& apt update && apt install -y bazel
RUN apt-get install -y pkg-config libasound2-dev
RUN apt-get install -y libunistring-dev libldap-dev libkrb5-dev libgpg-error-dev gdb libc6-dbg libgtest-dev libbluetooth-dev
#gtest
RUN apt-get update && apt-get install -y \
googletest cmake g++ make \
&& rm -rf /var/lib/apt/lists/* \
&& cd /usr/src/googletest \
&& cmake -S . -B build \
&& cmake --build build -j"$(nproc)" \
&& cmake --install build
# bash history
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
&& echo "$SNIPPET" >> "/root/.bashrc"
RUN apt-get install -y libunistring-dev libldap-dev libkrb5-dev libgpg-error-dev ca-certificates tzdata curl && update-ca-certificates && date
WORKDIR /workspace
ENTRYPOINT ["/bin/bash"]
# [Optional] Uncomment this section to install additional vcpkg ports.
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
+26
View File
@@ -0,0 +1,26 @@
{
"name": "Bazel Dev Container",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"C_Cpp.default.configurationProvider": "ms-vscode.cpptools",
"C_Cpp.intelliSenseEngine": "Default"
},
"extensions": [
"ms-vscode.cpptools",
"bazelbuild.vscode-bazel",
"ms-vscode.cpptools-extension-pack"
],
}
},
"mounts": [
"source=${localWorkspaceFolder},target=/workspace,type=bind",
"source=bashhistory,target=/commandhistory,type=volume",
"source=${localWorkspaceFolder}/bazel-output,target=/bazel-output,type=bind",
"source=/run/dbus,target=/run/dbus,type=bind"
// "source=${localWorkspaceFolder}/build-bin,target=/workspace/bazel-bin,type=bind",
// "source=${localWorkspaceFolder}/build-out,target=/workspace/bazel-out,type=bind"
]
}