-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
41 lines (32 loc) · 1.33 KB
/
Dockerfile
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
FROM php:7.4-apache
ARG COCKPIT_VERSION="master"
RUN apt-get update \
&& apt-get install -y \
wget zip unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libwebp-dev \
libpng-dev \
sqlite3 libsqlite3-dev \
libssl-dev \
libzip-dev \
&& pecl install mongodb \
&& pecl install redis \
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j$(nproc) iconv gd pdo zip opcache pdo_sqlite \
&& a2enmod rewrite expires
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini
RUN echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini
RUN wget https://github.com/agentejo/cockpit/archive/${COCKPIT_VERSION}.zip -O /tmp/cockpit.zip; unzip /tmp/cockpit.zip -d /tmp/; rm /tmp/cockpit.zip
RUN mv /tmp/cockpit-${COCKPIT_VERSION}/.htaccess /var/www/html/.htaccess
RUN mv /tmp/cockpit-${COCKPIT_VERSION}/* /var/www/html/
RUN rm -R /tmp/cockpit-${COCKPIT_VERSION}/
RUN echo "\n\nphp_value post_max_size 256M" >> /var/www/html/.htaccess
RUN echo "\nphp_value upload_max_filesize 256M" >> /var/www/html/.htaccess
COPY src /var/www/html/
RUN chown -R www-data:www-data /var/www/html
COPY ./entrypoint /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint
VOLUME ["/var/www/html/storage"]
ENTRYPOINT ["entrypoint"]
CMD ["apache2-foreground"]