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.

20 lines
681 B

FROM rust:slim as rust
RUN apt-get update && apt-get install -y git pkg-config libssl-dev
RUN mkdir src && echo "fn main() {}" > src/
COPY Cargo.toml .
RUN sed -i '/.**/d' Cargo.toml
COPY Cargo.lock .
RUN cargo build --release
COPY . /src
RUN cargo build --release
FROM debian:bullseye-slim
#RUN useradd -ms /bin/bash -u 1000 pages
#RUN mkdir -p /var/www/pages && chown pages /var/www/pages
RUN apt-get update && apt-get install -y ca-certificates
COPY scripts/ /usr/local/bin/
RUN chmod +x /usr/local/bin/
COPY --from=rust /src/target/release/pages /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/"]