A website for temporary file- or text hosting https://trash.ctdo.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
645 B

FROM rust:alpine as builder
WORKDIR /app
RUN apk add musl-dev
RUN cargo init
COPY Cargo.toml Cargo.lock ./
RUN cargo build --release --target=x86_64-unknown-linux-musl
COPY src ./src
COPY static ./static
COPY template ./template
COPY snippet ./snippet
COPY init-db.sql ./init-db.sql
RUN touch src/main.rs
RUN cargo build --release --target=x86_64-unknown-linux-musl
RUN strip /app/target/x86_64-unknown-linux-musl/release/datatrash
FROM alpine
WORKDIR /opt/datatrash
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/datatrash ./
COPY static ./static
RUN mkdir ./files
EXPOSE 8000
ENTRYPOINT ["/opt/datatrash/datatrash"]