Skip to content

Commit 31e4287

Browse files
committed
Add devcontainer
Signed-off-by: Christian König <[email protected]>
1 parent f5a46c6 commit 31e4287

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# syntax=docker/dockerfile:1
2+
ARG debian_version=slim-bookworm
3+
ARG rust_version=1.70.0
4+
FROM rust:${rust_version}-${debian_version}
5+
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
8+
9+
RUN apt-get update && \
10+
apt-get install -y --no-install-recommends \
11+
git \
12+
nano\
13+
openssh-server \
14+
# for rust-analyzer vscode plugin
15+
pkg-config \
16+
# developer dependencies
17+
libunwind-dev \
18+
libpulse-dev \
19+
portaudio19-dev \
20+
libasound2-dev \
21+
libsdl2-dev \
22+
gstreamer1.0-dev \
23+
libgstreamer-plugins-base1.0-dev \
24+
libavahi-compat-libdnssd-dev && \
25+
rm -rf /var/lib/apt/lists/*
26+
27+
RUN rustup component add rustfmt && \
28+
rustup component add clippy && \
29+
cargo install cargo-hack

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Librespot Devcontainer",
3+
"dockerFile": "Dockerfile",
4+
// Use 'postCreateCommand' to run commands after the container is created.
5+
//"postCreateCommand": "",
6+
"customizations": {
7+
// Configure properties specific to VS Code.
8+
"vscode": {
9+
"settings": {
10+
"dev.containers.copyGitConfig": true
11+
},
12+
"extensions": [
13+
"eamodio.gitlens",
14+
"github.vscode-github-actions",
15+
"rust-lang.rust-analyzer"
16+
]
17+
}
18+
},
19+
"containerEnv": {
20+
"GIT_EDITOR": "nano"
21+
}
22+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
23+
// "remoteUser": "root"
24+
}

0 commit comments

Comments
 (0)