1
0
Fork 0
mirror of https://codeberg.org/icewind/shelve.git synced 2026-06-03 20:14:08 +02:00
This commit is contained in:
Robin Appelman 2024-01-06 22:51:28 +01:00
commit 9fcc3c6044
2 changed files with 0 additions and 32 deletions

View file

@ -1,25 +0,0 @@
FROM rust AS build
RUN rustup target add x86_64-unknown-linux-musl
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 --target x86_64-unknown-linux-musl && \
rm -r src
COPY src/ ./src/
COPY templates/ ./templates/
RUN touch src/main.rs && cargo build --release --target x86_64-unknown-linux-musl
FROM scratch
COPY --from=build /target/x86_64-unknown-linux-musl/release/shelve /
EXPOSE 80
ENV ROCKET_PORT=80
ENV ROCKET_ADDRESS=0.0.0.0
CMD ["/shelve"]

View file

@ -1,7 +0,0 @@
target/x86_64-unknown-linux-musl/release/shelve:
cargo b --release --target x86_64-unknown-linux-musl
.PHONY: target/x86_64-unknown-linux-musl/release/shelve
docker: target/x86_64-unknown-linux-musl/release/shelve
docker build -t icewind1991/shelve .