Docker & Rust CI/CD
This commit is contained in:
0
.gitea/workflows/rust.yaml
Normal file
0
.gitea/workflows/rust.yaml
Normal file
21
Dockerfile
Normal file
21
Dockerfile
Normal 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
1
docker_build.sh
Executable file
@@ -0,0 +1 @@
|
||||
docker build . -t joshuafhiggins/status-checker
|
||||
5
docker_run.sh
Executable file
5
docker_run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
docker run -d \
|
||||
--name=vpn-status-indicator
|
||||
-p 5581:8000 \
|
||||
--restart unless-stopped \
|
||||
joshuafhiggins/status-checker
|
||||
Reference in New Issue
Block a user