2021-09-22 18:04:00 +02:00
|
|
|
FROM rust:1.55.0-bullseye as builder
|
2021-09-22 16:08:30 +02:00
|
|
|
|
2021-09-22 18:04:00 +02:00
|
|
|
# ENV RUSTFLAGS="-C target-feature=+crt-static"
|
2021-09-22 16:08:30 +02:00
|
|
|
WORKDIR /build
|
|
|
|
|
2021-09-22 18:04:00 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
libssl-dev
|
2021-09-22 16:08:30 +02:00
|
|
|
|
|
|
|
COPY ./ /build
|
2021-09-22 18:04:00 +02:00
|
|
|
RUN cargo build --release
|
2021-09-22 16:08:30 +02:00
|
|
|
|
2021-09-22 18:04:00 +02:00
|
|
|
FROM gcr.io/distroless/base
|
2021-09-22 16:08:30 +02:00
|
|
|
|
2021-09-22 18:04:00 +02:00
|
|
|
COPY --from=builder /build/target/release/songlify /usr/bin/songlify
|
|
|
|
COPY --from=builder /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/
|
|
|
|
COPY --from=builder /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/
|
2021-09-22 16:08:30 +02:00
|
|
|
|
|
|
|
ENTRYPOINT /usr/bin/songlify
|