Skip to content

Commit f856494

Browse files
author
sioomy
committed
docker file
1 parent bbcdfff commit f856494

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

‎README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ docker run --privileged -p 8083:80 phpcoro/php-fpm-coro
195195

196196
## 项目调试方法三,Docker build安装:
197197

198-
1.进入tutorial/,执行:
198+
1.进入项目根目录,执行:
199199
```
200-
docker build -t php-fpm-coro ./
200+
docker build -t php-fpm-coro -f tutorial/Dockerfile ./
201201
```
202202
2.运行docker:
203203
```
204-
docker run --privileged -p 8083:80 -v `pwd`:/data/soft/php-fpm-coroutine/tutorial php-fpm-coro
204+
docker run --privileged -p 8083:80 -v `pwd`/tutorial:/data/soft/php-fpm-coroutine/tutorial php-fpm-coro
205205
```
206206
3.浏览器输入网址
207207
```
@@ -439,16 +439,16 @@ docker run --privileged -p 8083:80 phpcoro/php-fpm-coro
439439

440440

441441

442-
1. enter tutorial/, execute:
442+
1. enter root dir of project, execute:
443443

444444
```
445-
docker build -t php-fpm-coro ./
445+
docker build -t php-fpm-coro -f tutorial/Dockerfile ./
446446
```
447447

448448
2. run docker:
449449

450450
```
451-
docker run --privileged -p 8083:80 -v `pwd`:/data/soft/php-fpm-coro/tutorial php-fpm-coro
451+
docker run --privileged -p 8083:80 -v `pwd`/tutorial:/data/soft/php-fpm-coro/tutorial php-fpm-coro
452452
```
453453

454454
3. browsers enter the URL

‎tutorial/Dockerfile

+12-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ RUN yum -y install openssl-devel
1414
RUN yum -y install wget
1515
RUN yum -y install freetype-devel
1616
RUN yum -y install libjpeg-devel
17-
RUN yum -y install freetds-devel
1817
RUN yum -y install unixODBC-devel
1918
RUN yum -y install libpng-devel
2019
RUN yum -y install aspell-devel
@@ -25,15 +24,20 @@ RUN yum -y install curl-devel
2524
RUN yum -y install gdbm-devel
2625
RUN yum -y install libicu-devel
2726
RUN yum -y install openldap-devel
28-
RUN yum -y install libmcrypt-devel
27+
RUN yum -y install libtomcrypt-devel
2928
RUN yum -y install libxslt-devel
3029
RUN yum -y install libzip-devel
3130
RUN yum -y install libedit-devel
3231
RUN yum -y install postgresql-devel
3332
RUN yum -y install gcc-c++
33+
RUN yum -y install libxml2-devel
3434

3535

3636

37+
RUN cd /data/soft/ && wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
38+
RUN cd /data/soft/ && tar zxvf freetds-stable.tgz
39+
RUN cd /data/soft/freetds-* && ./configure --prefix=/usr --sysconfdir=/etc --with-tdsver=0.91 --enable-msdblib && make && make install
40+
3741
RUN cd /data/soft/ && wget http://mirrors.tuna.tsinghua.edu.cn/epel/epel-release-latest-7.noarch.rpm
3842
RUN cd /data/soft/ && rpm -ivh epel-release-latest-7.noarch.rpm
3943
RUN yum -y install supervisor
@@ -42,20 +46,22 @@ RUN cd /data/soft/ && wget http://nih.at/libzip/libzip-1.2.0.tar.gz
4246
RUN cd /data/soft/ && tar zxvf libzip-1.2.0.tar.gz && cd libzip-1.2.0 && ./configure && make && make install
4347
RUN cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
4448

45-
RUN ln -s /usr/lib64/libsybdb.so /usr/lib/lib/libsybdb.so
49+
#RUN ln -s /usr/lib64/libsybdb.so /usr/lib/libsybdb.so
4650
#RUN ln -s /usr/lib64/libgdbm.so /usr/lib/libgdbm.so
4751
RUN ln -s /usr/lib64/libldap.so /usr/lib/libldap.so
4852
RUN ln -s /usr/lib64/liblber* /usr/lib/
4953

5054

51-
RUN cd /data/soft/ && git clone http://.com/phpcoro/php-fpm-coro.git
55+
#RUN cd /data/soft/ && git clone https://.com/phpcoro/php-fpm-coro.git
56+
ADD ./ /data/soft/php-fpm-coro
57+
5258
RUN cd /data/soft/ && git clone http://.com/libevent/libevent.git
53-
RUN cd /data/soft/ && git clone http://.com/GNOME/libxml2.git
59+
#RUN cd /data/soft/ && git clone http://.com/GNOME/libxml2.git
5460
RUN cd /data/soft/ && wget http://nginx.org/download/nginx-1.14.0.tar.gz
5561
RUN cd /data/soft/ && tar zxf nginx-1.14.0.tar.gz
5662

5763
RUN cd /data/soft/libevent && sh autogen.sh && ./configure && make && make install
58-
RUN cd /data/soft/libxml2 && sh autogen.sh && ./configure && make && make install
64+
#RUN cd /data/soft/libxml2 && sh autogen.sh && ./configure && make && make install
5965
RUN cd /data/soft/php-fpm-coro && sh buildconf --force && ./configure --prefix=/usr/local/php7 --enable-fpm --enable-coro_http --enable-mysqlnd --enable-zip --with-pdo-mysql --with-openssl --enable-maintainer-zts --enable-opcache-file --with-curl --enable-bcmath --enable-calendar --enable-dtrace --enable-exif --enable-ftp --enable-mbregex --enable-mbstring --enable-pcntl --enable-phpdbg --enable-phpdbg-webhelper --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-bz2 --with-iconv --with-pic --with-xmlrpc --with-mhash --with-mysql-sockunixunix=/tmp/mysql.sock --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-kerberos --with-layout=GNU --with-mcrypt=/usr/include --with-gd --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-webp-dir=/usr/include --with-freetype-dir=/usr/include --with-icu-dir=/usr --with-pspell --with-xsl --with-libzip --enable-zip --with-zlib --with-pdo-dblib --with-pdo-odbc=unixODBC,/usr --with-unixODBC=/usr --with-libedit --enable-dba --with-ldap --with-ldap-sasl --with-pdo-pgsql --with-pgsql --with-gdbm --enable-intl && make && make install
6066
RUN cd /data/soft/nginx-1.14.0 && ./configure && make && make install
6167

0 commit comments

Comments
 (0)