https://github.com/shilazi/docker-compose-wait
583
FROM tonistiigi/xx AS xx
# ----- 8< -----
FROM rust:1.82-bookworm AS builder
COPY --from=xx / /
RUN set -x \
&& apt-get update \
&& apt-get install -y clang lld
ARG TARGETPLATFORM
WORKDIR /build
ADD . /build/
RUN set -x \
&& xx-cargo build --release --target-dir ./build \
&& xx-verify ./build/$(xx-cargo --print-target-triple)/release/wait \
&& mv ./build/$(xx-cargo --print-target-triple)/release/wait /wait \
&& chmod +x /wait
# ----- 8< -----
FROM scratch
COPY --from=builder /wait /wait
https://github.com/ufoscout/docker-compose-wait/blob/master/README.md#usage
## Use whatever base image
FROM alpine
## Add the wait script to the image
COPY --from=ghcr.io/shilazi/docker-compose-wait:latest /wait /wait
## Otherwise you can directly download the executable from github releases. E.g.:
# ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.11.0/wait /wait
# RUN chmod +x /wait
## Add your application to the docker image
ADD MySuperApp.sh /MySuperApp.sh
## Launch the wait tool and then your application
CMD /wait && /MySuperApp.sh
Content type
Image
Digest
sha256:fafa9dfb3…
Size
189.8 kB
Last updated
almost 2 years ago
docker pull shilazi/docker-compose-wait