init docker

This commit is contained in:
b1ek 2025-02-25 16:55:23 +10:00
parent 9d4382356d
commit 216cc6ca82
Signed by: blek
GPG Key ID: A622C22C9BC616B2
4 changed files with 22 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
target
Dockerfile

1
.gitignore vendored
View File

@ -1 +1,2 @@
/target
docker-compose.yml

View File

@ -8,3 +8,8 @@ hyper-util = { version = "0.1.10", features = ["tokio"] }
hyper = { version = "1.6.0", features = ["full"] }
tokio = { version = "1.43.0", features = ["full"] }
http-body-util = "0.1.2"
[profile.release]
strip = true
lto = true
opt-level = 3

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM rust:alpine AS build
RUN apk add musl-dev
WORKDIR /build
COPY . .
RUN cargo b -r
FROM alpine:3.21
COPY --from=build /build/target/release/ipblekcodes /usr/bin/server
ENTRYPOINT [ "/usr/bin/server" ]