mirror of
https://codeberg.org/icewind/shelve.git
synced 2026-06-03 12:04:09 +02:00
cleanup
This commit is contained in:
parent
6c9cb7ac7d
commit
9fcc3c6044
2 changed files with 0 additions and 32 deletions
25
Dockerfile
25
Dockerfile
|
|
@ -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"]
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -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 .
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue