Docker & Rust CI/CD

This commit is contained in:
Joshua Higgins
2025-04-08 19:57:13 -04:00
parent e8954d40bc
commit 3d1aabc9bc
4 changed files with 27 additions and 0 deletions

View File

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM rust:1.84.0-slim as build
RUN rustup target add x86_64-unknown-linux-musl && \
apt update && \
apt install -y musl-tools musl-dev && \
update-ca-certificates
COPY ./src ./src
COPY ./Cargo.lock .
COPY ./Cargo.toml .
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid 10001 \
"tom"
RUN cargo build --target x86_64-unknown-linux-musl --release

1
docker_build.sh Executable file
View File

@@ -0,0 +1 @@
docker build . -t joshuafhiggins/status-checker

5
docker_run.sh Executable file
View File

@@ -0,0 +1,5 @@
docker run -d \
--name=vpn-status-indicator
-p 5581:8000 \
--restart unless-stopped \
joshuafhiggins/status-checker