build / Garde-fou (pull_request) Successful in 11s
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (pull_request) Skipped
build / Images Harbor (web, Dockerfile) (pull_request) Skipped
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (push) Successful in 9m49s
build / Garde-fou (push) Successful in 10s
build / Images Harbor (web, Dockerfile) (push) Successful in 11m25s
25 lines
892 B
Docker
25 lines
892 B
Docker
# syntax=docker/dockerfile:1
|
|
# Synchronise le depot du catalogue dans un volume partage avec l'application,
|
|
# puis demande a celle-ci de le relire. Le catalogue evolue ainsi sans nouvelle
|
|
# image de l'application.
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --no-cache git curl tini su-exec \
|
|
&& addgroup -g 10001 enclume \
|
|
&& adduser -u 10001 -G enclume -D -H enclume
|
|
|
|
COPY docker/catalog-sync.sh /usr/local/bin/catalog-sync
|
|
COPY docker/catalog-sync-entrypoint.sh /usr/local/bin/entrypoint
|
|
RUN chmod +x /usr/local/bin/catalog-sync /usr/local/bin/entrypoint
|
|
|
|
ENV CATALOG_REPO="" \
|
|
CATALOG_BRANCH=main \
|
|
CATALOG_SUBDIR=catalog \
|
|
CATALOG_DEST=/catalogue \
|
|
SYNC_INTERVAL=300 \
|
|
REVISIONS_CONSERVEES=3 \
|
|
RELOAD_URL=http://web:8080/recharger
|
|
|
|
# Demarre en root pour ajuster le volume, puis bascule sur l'utilisateur enclume.
|
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/entrypoint"]
|