-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (44 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
52 lines (44 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM php:8.4-fpm-bookworm
# Installer Nginx et dépendances
RUN apt update \
&& apt-get install -y --no-install-recommends \
nginx \
git \
mariadb-client \
cron \
libzip-dev \
libpng-dev \
libldap2-dev \
libpq-dev \
&& docker-php-ext-install \
pdo_mysql \
pdo_pgsql \
zip \
gd \
ldap \
&& docker-php-ext-enable opcache \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& rm -rf /var/lib/apt/lists/*
RUN touch /etc/mailname
RUN echo "sender@yourdomain.org" > /etc/mailname
RUN echo "* * * * * root cd /var/www/deming && php artisan schedule:run >> /dev/null 2>&1" >> /etc/crontab
RUN useradd -ms /bin/bash deming
RUN mkdir -p /var/www/deming
WORKDIR /var/www/deming
RUN git clone https://www.github.com/dbarzin/deming .
RUN cp docker/deming.conf /etc/nginx/conf.d/default.conf
RUN cp docker/userdemo.sh /etc/userdemo.sh
COPY docker/resetdb.sh /etc/resetdb.sh
RUN cp docker/uploadiso27001db.sh /etc/uploadiso27001db.sh
COPY docker/initialdb.sh /etc/initialdb.sh
RUN chmod +x /etc/*.sh
RUN mkdir -p storage/framework/views && mkdir -p storage/framework/cache && mkdir -p storage/framework/sessions && mkdir -p bootstrap/cache
RUN chmod -R 775 /var/www/deming/storage && chown -R www-data:www-data /var/www/deming
RUN composer install
RUN php artisan vendor:publish --all
RUN cp .env.example .env
RUN sed -i 's/DB_HOST=127\.0\.0\.1/DB_HOST=mysql/' .env
COPY docker/entrypoint.sh /opt/entrypoint.sh
RUN chmod u+x /opt/entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/opt/entrypoint.sh"]