Fix Dockerfile not finding binary
Some checks failed
Build Docker Image / arm-docker-build (push) Failing after 1s

This commit is contained in:
Gabriel Simmer 2023-07-16 20:10:04 +01:00
parent edede06bd6
commit 101c56bf5d
Signed by: arch
GPG key ID: C81B106D46C5B875
3 changed files with 8 additions and 9 deletions

View file

@ -8,3 +8,4 @@ README.md
.envrc
flake.*
theme.css
Dockerfile

View file

@ -3,8 +3,6 @@ name = "dref"
version = "0.2.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
axum = "0.6.1"
maud = { git = "https://github.com/mhutter/maud", branch = "axum-0.6", features = ["axum"] }

View file

@ -1,17 +1,17 @@
FROM rust:latest AS builder
FROM docker.io/library/rust:1.62-alpine as builder
RUN apt update && apt install -y musl-tools musl-dev
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static
RUN update-ca-certificates
WORKDIR /dref
WORKDIR /build
COPY ./ .
RUN cargo build --release
RUN cargo build --release --bins
FROM scratch
WORKDIR /dref
COPY --from=builder /dref/target/release/docker-rs-dashboard ./dref
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /build/target/release/dref /
CMD ["/dref/dref"]
CMD ["./dref"]