build: adding debugging to dev container
This commit is contained in:
parent
978d7cb089
commit
0fe2c033b3
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[build]
|
||||||
|
target = "x86_64-unknown-linux-musl"
|
||||||
@ -13,10 +13,17 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
FROM rust:1-alpine
|
FROM rust:1-buster
|
||||||
|
|
||||||
RUN apk add bash docker git cmake make automake musl-dev autoconf libtool valgrind \
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
flex bison linux-headers openssl-dev apache2-utils docker-compose && \
|
|
||||||
|
#apk add musl-dev openssl-dev docker-compose lldb && \
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y git cmake make automake autoconf libtool valgrind flex \
|
||||||
|
linux-headers-5.10 bison docker-compose lldb libssl-dev libnl-3-dev sudo && \
|
||||||
rustup component add clippy && \
|
rustup component add clippy && \
|
||||||
mkdir /etc/docker && \
|
rustup target add x86_64-unknown-linux-musl && \
|
||||||
echo '{ "storage-driver": "vfs" }' > /etc/docker/daemon.json
|
useradd vscode && \
|
||||||
|
mkdir -p /home/vscode && \
|
||||||
|
chown -R vscode:vscode /home/vscode && \
|
||||||
|
echo "vscode ALL=(ALL: ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
22
.devcontainer/Dockerfile.alpine
Normal file
22
.devcontainer/Dockerfile.alpine
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Copyright (C) 2023 Andrew Rioux
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
FROM rust:1-alpine
|
||||||
|
|
||||||
|
RUN apk add bash docker git cmake make automake musl-dev autoconf libtool valgrind \
|
||||||
|
flex bison linux-headers openssl-dev apache2-utils docker-compose lldb && \
|
||||||
|
rustup component add clippy && \
|
||||||
|
mkdir /etc/docker && \
|
||||||
|
echo '{ "storage-driver": "vfs" }' > /etc/docker/daemon.json
|
||||||
@ -7,7 +7,10 @@
|
|||||||
"vscode": {
|
"vscode": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"licenser.license": "AGPLv3",
|
"licenser.license": "AGPLv3",
|
||||||
"licenser.projectName": "sparse"
|
"licenser.projectName": "sparse",
|
||||||
|
"lldb.executable": "/usr/bin/lldb",
|
||||||
|
"rust-analyzer.checkOnSave": true,
|
||||||
|
"rust-analyzer.checkOnSave.command": "clippy"
|
||||||
},
|
},
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"tootone.org-mode",
|
"tootone.org-mode",
|
||||||
@ -19,6 +22,17 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runArgs": ["--privileged"],
|
"runArgs": [
|
||||||
"postStartCommand": "git submodule update --init; chown -R 1000:1000 .; nohup bash -c 'dockerd &' > /docker.log 2> /docker.log"
|
"--privileged",
|
||||||
|
"--cap-add=SYS_PTRACE",
|
||||||
|
"--security-opt",
|
||||||
|
"seccomp=unconfined"
|
||||||
|
],
|
||||||
|
"postStartCommand": "git submodule update --init",
|
||||||
|
"remoteUser": "vscode",
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker": {
|
||||||
|
"dockerDashComposeVersion": "v2"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@ -78,6 +78,12 @@
|
|||||||
"args": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}"
|
"cwd": "${workspaceFolder}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "attach",
|
||||||
|
"name": "Debug executable 'ex-bind-shell-backdoor' (attach)",
|
||||||
|
"program": "ex-bind-shell-backdoor"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "lldb",
|
"type": "lldb",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user