-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (25 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
40 lines (25 loc) · 1.07 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
# Dockerfile for PHP 7.4
FROM php:7.4-fpm
# Install necessary PHP extensions
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libonig-dev libpng-dev libxml2-dev libzip-dev zip unzip curl git vim \
default-mysql-client mariadb-client
RUN docker-php-ext-install mysqli pdo pdo_mysql zip gd mbstring
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN mysql --version && mysqldump --version
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
RUN cd ~ && git clone https://github.com/modmore/Gitify.git && cd Gitify && composer install --no-dev && chmod +x bin/gitify && cd -
# Install Gitify
RUN echo "alias gitify=/root/Gitify/bin/gitify" >> /root/.bashrc
RUN echo "date.timezone=Asia/Bangkok" >> /usr/local/etc/php/conf.d/datetime.ini
# Set working directory
WORKDIR /var/www/html
VOLUME /var/www/html
RUN usermod -u 1000 www-data
RUN chown -R www-data:www-data /var/www/html
# Expose port
EXPOSE 9000
CMD [ "php-fpm" ]