docker for kubepod noroot & readonly
This commit is contained in:
@ -1,11 +1,93 @@
|
||||
FROM reg.cadoles.com/envole/nineapache:8.2
|
||||
FROM alpine:3.18
|
||||
|
||||
RUN apk update && apk upgrade
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
sed \
|
||||
vim \
|
||||
ca-certificates \
|
||||
openldap-clients \
|
||||
wget \
|
||||
npm \
|
||||
git \
|
||||
curl \
|
||||
unzip \
|
||||
zip \
|
||||
openssl \
|
||||
mariadb-client \
|
||||
supervisor
|
||||
|
||||
RUN apk add --no-cache \
|
||||
apache2 \
|
||||
apache2-proxy \
|
||||
apache2-ssl
|
||||
|
||||
RUN apk add --no-cache \
|
||||
php82 \
|
||||
php82-cli \
|
||||
php82-apache2 \
|
||||
php82-gd \
|
||||
php82-zip \
|
||||
php82-xml \
|
||||
php82-ctype \
|
||||
php82-simplexml \
|
||||
php82-tokenizer \
|
||||
php82-sodium \
|
||||
php82-dom \
|
||||
php82-pdo \
|
||||
php82-pdo_pgsql \
|
||||
php82-pdo_mysql \
|
||||
php82-curl \
|
||||
php82-ldap \
|
||||
php82-pecl-igbinary \
|
||||
php82-session \
|
||||
php82-pecl-redis \
|
||||
php82-fileinfo \
|
||||
php82-xmlwriter \
|
||||
php82-openssl \
|
||||
php82-phar \
|
||||
php82-iconv \
|
||||
php82-mbstring \
|
||||
php82-fpm \
|
||||
php82-sockets \
|
||||
php82-opcache \
|
||||
php82-intl \
|
||||
php82-bcmath \
|
||||
php82-pecl-ssh2
|
||||
|
||||
RUN ln -s /usr/bin/php82 /usr/bin/php
|
||||
|
||||
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
RUN npm install -g n
|
||||
RUN npm install -g yarn
|
||||
|
||||
# Configurer les permissions pour Apache et PHP
|
||||
RUN mkdir -p /etc/supervisor.d && \
|
||||
mkdir -p /app/public && \
|
||||
mkdir -p /etc/apache2/conf.d/nine && \
|
||||
mkdir -p /var/log/apache2 && \
|
||||
mkdir -p /run/apache2 && \
|
||||
chown -R apache:apache /var/log/apache2 /etc/apache2 /app /run/apache2
|
||||
|
||||
# Copier les fichiers de configuration
|
||||
COPY ./misc/docker/php.local.ini /etc/php82/conf.d/
|
||||
COPY ./misc/docker/httpd.conf /etc/apache2/httpd.conf
|
||||
COPY ./misc/docker/site.conf /etc/apache2/conf.d/nine/site.conf
|
||||
COPY ./misc/docker/ssl.conf /etc/apache2/conf.d/ssl.conf
|
||||
COPY ./misc/docker/index.php /app/public/index.php
|
||||
COPY ./misc/docker/apache.conf /etc/apache2/conf.d/nine/site.conf
|
||||
|
||||
# Commande de démarrage
|
||||
USER apache
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# Installation des dépendances composer
|
||||
RUN composer install --no-interaction
|
||||
|
||||
CMD /etc/apache2/apache2.sh
|
||||
CMD httpd -DFOREGROUND
|
||||
|
Reference in New Issue
Block a user