bitque/docker/Dockerfile.build

23 lines
828 B
Docker

FROM archlinux:latest as diesel
WORKDIR /app/
RUN pacman -Syu --noconfirm curl git openssl postgresql gcc openssl make cmake rustup
RUN rustup default nightly
RUN cargo install diesel_cli --no-default-features --features postgres
RUN cp ~/.cargo/bin/diesel /usr/bin/diesel
FROM archlinux:latest as build-app
WORKDIR /app/
RUN pacman -Syu --noconfirm curl git openssl postgresql gcc openssl make cmake rustup
RUN rustup default nightly
COPY . .
RUN cargo install --no-default-features --features local-storage --path ./crates/bitque-server
RUN cp ~/.cargo/bin/bitque /usr/bin/bitque
FROM archlinux:latest
WORKDIR /app/
RUN pacman -Syu --noconfirm curl git openssl postgresql gcc openssl make cmake rustup
COPY --from=diesel /usr/bin/diesel /usr/bin/diesel
COPY --from=build-app /usr/bin/bitque /usr/bin/bitque
CMD boot-bitque