2021-07-11 20:00:39 +02:00
|
|
|
FROM ekidd/rust-musl-builder as builder
|
2020-03-03 05:56:17 +01:00
|
|
|
|
2021-07-11 20:00:39 +02:00
|
|
|
RUN curl -L -o monolith.tar.gz $(curl -s https://api.github.com/repos/y2z/monolith/releases/latest \
|
|
|
|
| grep "tarball_url.*\"," \
|
|
|
|
| cut -d '"' -f 4)
|
2020-03-03 05:56:17 +01:00
|
|
|
RUN tar xfz monolith.tar.gz \
|
2021-03-01 08:46:38 +01:00
|
|
|
&& mv Y2Z-monolith-* monolith \
|
|
|
|
&& rm monolith.tar.gz
|
2020-03-03 05:56:17 +01:00
|
|
|
|
2021-07-11 20:00:39 +02:00
|
|
|
WORKDIR monolith/
|
2020-03-03 05:56:17 +01:00
|
|
|
RUN make install
|
|
|
|
|
2021-07-11 20:00:39 +02:00
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
RUN apk update && \
|
|
|
|
apk add --no-cache openssl && \
|
|
|
|
rm -rf "/var/cache/apk/*"
|
|
|
|
|
|
|
|
COPY --from=builder /home/rust/.cargo/bin/monolith /usr/bin/monolith
|
2020-03-03 05:56:17 +01:00
|
|
|
WORKDIR /tmp
|
2021-07-11 20:00:39 +02:00
|
|
|
ENTRYPOINT ["/usr/bin/monolith"]
|