Add working docker image
parent
10040d1f39
commit
f0b904f17e
17
Dockerfile
17
Dockerfile
|
@ -1,17 +1,18 @@
|
||||||
FROM rust:1.55.0-alpine3.14 as builder
|
FROM rust:1.55.0-bullseye as builder
|
||||||
|
|
||||||
ENV RUSTFLAGS="-C target-feature=+crt-static"
|
# ENV RUSTFLAGS="-C target-feature=+crt-static"
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN apk add --no-cache musl-dev \
|
RUN apt-get update && apt-get install -y \
|
||||||
openssl-dev \
|
libssl-dev
|
||||||
build-base
|
|
||||||
|
|
||||||
COPY ./ /build
|
COPY ./ /build
|
||||||
RUN cargo build --target x86_64-unknown-linux-musl --release # --verbose && ls -lah /build/target/release/build/ && ls -lah .
|
RUN cargo build --release
|
||||||
|
|
||||||
FROM gcr.io/distroless/static
|
FROM gcr.io/distroless/base
|
||||||
|
|
||||||
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/songlify /usr/bin/songlify
|
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/
|
||||||
|
|
||||||
ENTRYPOINT /usr/bin/songlify
|
ENTRYPOINT /usr/bin/songlify
|
|
@ -69,4 +69,6 @@ async fn main() {
|
||||||
respond(())
|
respond(())
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
log::info!("Exiting...");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue