# 2023-08-27 ## HOWTO: ## debug image with local bash session: ## ## docker run -it --entrypoint bash zogg/watchtower:latest # -------------------------------------------------- # Intermediary Build # -------------------------------------------------- FROM containrrr/watchtower:latest as BUILD # Arguments from Docker build ARG TARGETPLATFORM ARG TARGETOS ARG TARGETARCH ARG BUILDPLATFORM ARG BUILDOS ARG BUILDARCH ARG BUILDVARIANT ARG CONCURRENCY # -------------------------------------------------- # Final Docker Image # -------------------------------------------------- FROM alpine:latest # Arguments from Docker build ARG TARGETPLATFORM ARG TARGETOS ARG TARGETARCH ARG BUILDPLATFORM ARG BUILDOS ARG BUILDARCH ARG BUILDVARIANT ARG CONCURRENCY # Update & upgrade APK + Install required packages USER root WORKDIR / RUN apk add --no-cache wget bash # Set bash as default shell interpreter SHELL ["/bin/bash", "-c"] # Used by Docker build to set platform dependent variables COPY platform.sh . RUN chmod +x platform.sh \ && ./platform.sh \ && rm -rf platform.sh # Copy necessary files COPY healthcheck.sh /healthcheck # Setup execution rights RUN chmod +x /healthcheck USER root WORKDIR / # Copy from build COPY --from=build /. / # Disable Watchtower image check LABEL com.centurylinklabs.watchtower.enable false # Define author's informations LABEL org.opencontainers.image.title "Watchtower Special Edition" LABEL author "Olivier Le Bris" LABEL maintainer "tech@zogg.fr" LABEL org.opencontainers.image.source "https://zogg.fr" LABEL org.opencontainers.image.licenses MIT ENTRYPOINT ["/watchtower"]