mirror of
https://codeberg.org/librarian/stream-proxy
synced 2024-12-06 19:26:34 +01:00
Add Dockerfile
This commit is contained in:
@@ -1 +1,2 @@
|
||||
/target
|
||||
vendor
|
||||
Generated
+8
-8
@@ -643,14 +643,6 @@ version = "0.2.122"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259"
|
||||
|
||||
[[package]]
|
||||
name = "librarian-proxy"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"awc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "local-channel"
|
||||
version = "0.1.2"
|
||||
@@ -1040,6 +1032,14 @@ version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
||||
|
||||
[[package]]
|
||||
name = "stream-proxy"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"awc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.91"
|
||||
|
||||
+8
-2
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "librarian-proxy"
|
||||
name = "stream-proxy"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
@@ -7,4 +7,10 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { version = "4" }
|
||||
awc = { version = "3", features = ["rustls"] }
|
||||
awc = { version = "3", features = ["rustls"] }
|
||||
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
FROM rust:alpine AS build
|
||||
|
||||
WORKDIR /src
|
||||
RUN apk --no-cache add musl-dev git ca-certificates
|
||||
RUN git clone https://codeberg.org/librarian/stream-proxy .
|
||||
|
||||
RUN cargo vendor
|
||||
RUN cargo build --release
|
||||
RUN ls target/release
|
||||
|
||||
FROM scratch as bin
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=build /src/target/release/stream-proxy .
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["/app/stream-proxy"]
|
||||
Reference in New Issue
Block a user