-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 801 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 801 Bytes
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
FROM php:latest
LABEL maintainer="ChengYao" version="1.0" license="Apache-2.0" app.name="nextphp"
##
# ---------- env settings ----------
##
# --build-arg timezone=Asia/Shanghai
ARG timezone
ENV TIMEZONE=${timezone:-"Asia/Shanghai"}
# update
RUN set -ex \
# show php version and extensions
&& php -v \
&& php -m \
&& pecl install -D 'enable-sockets="yes" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="no"' swoole \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
WORKDIR /www
# Composer Cache
# COPY ./composer.* /opt/www/
# RUN composer install --no-dev --no-scripts
COPY . /www
RUN composer install --no-dev -o && php bin/swoole.php
EXPOSE 8989
ENTRYPOINT ["php", "/www/bin/swoole.php"]