Installation de Supercronic depuis un Dockerfile spécifique.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
ARG IMAGE=unknown
|
||||
|
||||
FROM ${IMAGE}
|
||||
|
||||
# Installation des dépendances
|
||||
RUN apt-get update && apt-get install -y curl \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configuration de Supercronic pour la gestion des tâches planifiées
|
||||
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.44/supercronic-linux-amd64 \
|
||||
SUPERCRONIC_SHA1SUM=6eb0a8e1e6673675dc67668c1a9b6409f79c37bc \
|
||||
SUPERCRONIC=supercronic-linux-amd64
|
||||
|
||||
RUN curl -fsSLO "$SUPERCRONIC_URL" \
|
||||
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
|
||||
&& chmod +x "$SUPERCRONIC" \
|
||||
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
|
||||
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
|
||||
@@ -1,13 +1,13 @@
|
||||
ARG SERVER_PHP_IMAGE=unknown
|
||||
ARG COMPOSER_IMAGE=composer:latest
|
||||
|
||||
# Image composer
|
||||
# Image Composer
|
||||
FROM ${COMPOSER_IMAGE} AS php_composer
|
||||
|
||||
# Image du serveur PHP à utiliser (Apache, FrankenPHP...)
|
||||
FROM ${SERVER_PHP_IMAGE}
|
||||
|
||||
# Installation de Composser
|
||||
# Installation de Composer
|
||||
COPY --from=php_composer /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
# Activation du mode rewrite d'Apache
|
||||
@@ -36,16 +36,16 @@ RUN apt-get update && apt-get install -y \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configuration de cron
|
||||
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.44/supercronic-linux-amd64 \
|
||||
SUPERCRONIC_SHA1SUM=6eb0a8e1e6673675dc67668c1a9b6409f79c37bc \
|
||||
SUPERCRONIC=supercronic-linux-amd64
|
||||
# Configuration de Supercronic pour la gestion des tâches planifiées
|
||||
#ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.44/supercronic-linux-amd64 \
|
||||
# SUPERCRONIC_SHA1SUM=6eb0a8e1e6673675dc67668c1a9b6409f79c37bc \
|
||||
# SUPERCRONIC=supercronic-linux-amd64
|
||||
|
||||
RUN curl -fsSLO "$SUPERCRONIC_URL" \
|
||||
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
|
||||
&& chmod +x "$SUPERCRONIC" \
|
||||
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
|
||||
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
|
||||
#RUN curl -fsSLO "$SUPERCRONIC_URL" \
|
||||
# && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
|
||||
# && chmod +x "$SUPERCRONIC" \
|
||||
# && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
|
||||
# && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
|
||||
|
||||
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ services:
|
||||
build:
|
||||
context: ${PWD}
|
||||
args:
|
||||
SERVER_PHP_IMAGE: ${SERVER_PHP_IMAGE}
|
||||
dockerfile: ${PWD}/docker/Dockerfile.server-php
|
||||
IMAGE: ${SERVER_PHP_IMAGE}
|
||||
dockerfile: ${PWD}/docker/Dockerfile.cron
|
||||
|
||||
command: supercronic /etc/crontab
|
||||
|
||||
|
||||
Reference in New Issue
Block a user