Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 0e87a7e

Browse files
committed
Add Dockerfile (at the expense of laptop battery)
1 parent f7097b0 commit 0e87a7e

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.github
2+
/target

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM rustlang/rust:nightly-alpine3.21 as build
2+
3+
WORKDIR /scripty
4+
5+
COPY . .
6+
7+
RUN apk add clang mold autoconf libtool automake make cmake
8+
9+
ENV RUSTFLAGS="--emit=asm --cfg tokio_unstable -Clink-arg=-fuse-ld=mold -Zshare-generics=y"
10+
ENV SQLX_OFFLINE=1
11+
12+
# There's no libopus.a whatsoever in the alpine repositories, so we're forced to build from source
13+
# Half the installed packages above are *just* for opus
14+
ENV LIBOPUS_NO_PKG=1
15+
16+
RUN cargo build --release
17+
18+
FROM alpine:3.21
19+
20+
WORKDIR /app
21+
COPY --from=build /scripty/target/release/scripty_v2 .
22+
23+
RUN adduser --home /nonexistent --no-create-home --disabled-password scripty
24+
USER scripty
25+
26+
VOLUME "/app/config.toml"
27+
28+
CMD ["/app/scripty_v2", "/app/config.toml"]

0 commit comments

Comments
 (0)