-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
43 lines (30 loc) · 1.37 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 io84/php:7.1-apache-alpine
MAINTAINER Rushairer <[email protected]>
# add aliyun source
RUN set -x \
&& { \
echo 'https://mirrors.aliyun.com/alpine/v3.4/main'; \
echo 'https://mirrors.aliyun.com/alpine/v3.4/community'; \
} | tee >> /etc/apk/repositories
# install composer
COPY ./resources/composer-installer composer-setup.php
#RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/bin --filename=composer\
&& php -r "unlink('composer-setup.php');"
# change composer source server
RUN composer config -g repo.packagist composer https://packagist.phpcomposer.com
# install laravel
RUN composer global require "workerman/gateway-worker"
WORKDIR /usr/local/
RUN docker-php-ext-install pdo_mysql pcntl
ENV WEBAPP_WWW_DIR /var/www
VOLUME $WEBAPP_WWW_DIR
WORKDIR $WEBAPP_WWW_DIR
COPY ./resources/GatewayWorker /usr/local/workerman
EXPOSE 80 8282
COPY ./resources/docker-workerman-entrypoint /usr/local/bin
ENTRYPOINT ["docker-workerman-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##