Skip to content

Commit fdf62d1

Browse files
authored
Add alpine based Dockerfile for Devcontainer (#1332)
1 parent b85bab5 commit fdf62d1

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

.devcontainer/Dockerfile.alpine

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# syntax=docker/dockerfile:1
2+
ARG alpine_version=alpine3.18
3+
ARG rust_version=1.74.0
4+
FROM rust:${rust_version}-${alpine_version}
5+
6+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
7+
ENV RUST_BACKTRACE=1
8+
ENV RUSTFLAGS="-D warnings -A renamed-and-removed-lints -C target-feature=-crt-static"
9+
10+
11+
RUN apk add --no-cache \
12+
git \
13+
nano\
14+
openssh-server \
15+
# for rust-analyzer vscode plugin
16+
pkgconf \
17+
musl-dev \
18+
# developer dependencies
19+
libunwind-dev \
20+
pulseaudio-dev \
21+
portaudio-dev \
22+
alsa-lib-dev \
23+
sdl2-dev \
24+
gstreamer-dev \
25+
gst-plugins-base-dev \
26+
jack-dev \
27+
avahi-dev && \
28+
rm -rf /lib/apk/db/*
29+
30+
RUN rustup component add rustfmt && \
31+
rustup component add clippy && \
32+
cargo install cargo-hack

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Librespot Devcontainer",
3-
"dockerFile": "Dockerfile",
3+
"dockerFile": "Dockerfile.alpine",
44
// Use 'postCreateCommand' to run commands after the container is created.
55
//"postCreateCommand": "",
66
"customizations": {

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e
44

0 commit comments

Comments
 (0)