mirror of
https://codeberg.org/icewind/rss-webhook-trigger.git
synced 2026-06-03 09:54:18 +02:00
docker setup
This commit is contained in:
parent
83d290173f
commit
cb7d037b6f
2 changed files with 22 additions and 0 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/target
|
||||
config.toml
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM ekidd/rust-musl-builder AS build
|
||||
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
|
||||
# Build with a dummy main to pre-build dependencies
|
||||
RUN mkdir src && \
|
||||
echo "fn main(){}" > src/main.rs && \
|
||||
cargo build --release && \
|
||||
rm -r src
|
||||
|
||||
COPY src/* ./src/
|
||||
RUN sudo chown -R rust:rust . && touch src/main.rs
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /home/rust/src/target/x86_64-unknown-linux-musl/release/rss-webhook-trigger /
|
||||
|
||||
CMD ["/rss-webhook-trigger"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue