-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (48 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
55 lines (48 loc) · 1.31 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
53
54
55
FROM webdevops/php-nginx:8.3
WORKDIR /var/www/html
COPY . /var/www/html
# Install packages
RUN apt-get update && apt-get install -y \
git \
zip \
curl \
sudo \
unzip \
libicu-dev \
libbz2-dev \
libpng-dev \
libjpeg-dev \
libmcrypt-dev \
libreadline-dev \
libfreetype6-dev \
g++ \
ssl-cert \
cron \
openssl
# Common PHP Extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install \
gd \
bz2 \
intl \
iconv \
bcmath \
opcache \
calendar \
mysqli \
pdo_mysql
# Ensure PHP logs are captured by the container
ENV LOG_CHANNEL=stderr
# Copy code and run composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN cd /var/www/html && composer install
# Update the file owner details
RUN chown -R www-data /var/www/html
# Allow the storage directory to be written by the owner
RUN chmod o+w -R /var/www/html/storage/
# RUN crontab -l | echo '* * * * * /usr/bin/bash -l -c "/var/www/html/docker/run_jobs.sh" > /var/www/html/jobs.log 2>&1' | crontab -
# Ensure the entrypoint file can be run
RUN openssl dhparam -out /etc/ssl/dhparam.pem 2048
RUN chmod 755 /var/www/html/docker/entrypoint.sh
CMD ["/bin/bash", "-c", "/var/www/html/docker/entrypoint.sh"]