mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-12-12 21:30:35 +05:30
Add dockerfile.
This commit is contained in:
parent
a6b0fd996c
commit
5cf99dd1fb
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
.*
|
||||
*.md
|
||||
target/
|
||||
LICENSE
|
||||
*.json
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
FROM rust:slim as BUILD
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/app/target/ \
|
||||
cargo build --release && \
|
||||
mv target/release/piped-proxy .
|
||||
|
||||
FROM debian:stable-slim
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
COPY --from=BUILD /app/piped-proxy .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/app/piped-proxy"]
|
Loading…
Reference in New Issue
Block a user