-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
41 lines (31 loc) · 1.36 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 openswoole/swoole:latest-alpine
MAINTAINER Muhammad Surya Ihsanuddin<[email protected]>
# Install Dependencies
RUN apk update
RUN apk add --no-cache supervisor vim autoconf gcc make g++ inotify-tools bash git
RUN apk add --no-cache libzip-dev curl-dev icu-dev oniguruma-dev imap-dev postgresql-dev
RUN apk add --no-cache libpng-dev openssl-dev nghttp2-dev hiredis-dev rabbitmq-c-dev
## Install Pecl Extension
RUN pecl channel-update pecl.php.net
RUN pecl install igbinary inotify apcu amqp
RUN pecl bundle redis && cd redis && phpize && ./configure --enable-redis-igbinary && make && make install
RUN docker-php-ext-enable igbinary redis inotify amqp apcu
# Install PHP Core Extensions
RUN docker-php-ext-install curl intl mbstring zip bcmath imap opcache gd pdo_pgsql pcntl iconv sockets
RUN docker-php-ext-enable curl intl mbstring zip bcmath imap opcache gd pdo_pgsql pcntl iconv sockets
# Install Composer
ADD docker/composer.sh /composer.sh
RUN chmod a+x /composer.sh
RUN /composer.sh && mv composer.phar /usr/local/bin/composer && chmod a+x /usr/local/bin/composer
RUN rm -f /composer.sh
# Cleaning
RUN docker-php-source delete
RUN rm -r /tmp/* /var/cache/*
# Here we go
ADD docker/supervisord.conf /etc/supervisord.conf
ADD docker/start.sh /start.sh
ADD docker/opcache.ini /etc/opcache.ini
RUN chmod +x /start.sh
WORKDIR /semart
EXPOSE 9501
CMD ["/start.sh"]