2023-12-09 14:03:06 +00:00
|
|
|
FROM docker.io/library/golang:1.21.5-alpine3.18 AS build
|
2021-09-15 16:15:43 +00:00
|
|
|
|
2021-10-24 10:39:00 +00:00
|
|
|
ARG VERSION=latest
|
|
|
|
|
2021-09-15 16:15:43 +00:00
|
|
|
COPY . /workspace
|
|
|
|
|
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
|
|
RUN set -ex && \
|
|
|
|
apk update && \
|
|
|
|
apk add git make && \
|
2021-10-24 10:39:00 +00:00
|
|
|
make install VERSION=${VERSION} DESTDIR=/db-wait PREFIX=/usr
|
2021-09-15 16:15:43 +00:00
|
|
|
|
2023-12-09 14:00:42 +00:00
|
|
|
FROM docker.io/library/alpine:3.19
|
|
|
|
|
2023-12-09 14:00:42 +00:00
|
|
|
ARG VERSION=latest
|
|
|
|
|
2023-12-09 14:00:42 +00:00
|
|
|
LABEL org.opencontainers.image.authors="Markus Pesch" \
|
|
|
|
org.opencontainers.image.description="Wait until database is ready for handling connections" \
|
|
|
|
org.opencontainers.image.documentation="https://git.cryptic.systems/volker.raschek/db-wait#db-wait" \
|
|
|
|
org.opencontainers.image.title="db-wait" \
|
2023-12-09 14:00:42 +00:00
|
|
|
org.opencontainers.image.vendor="Markus Pesch" \
|
|
|
|
org.opencontainers.image.version="${VERSION}"
|
2021-09-15 16:15:43 +00:00
|
|
|
|
|
|
|
COPY --from=build /db-wait /
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/bin/db-wait" ]
|