【发布时间】:2018-03-06 05:33:54
【问题描述】:
我是 docker 和 docker-compose 的初学者,我需要你的帮助。
我正在使用 docker-compose 制作 PHP-NGINX-PostgresSQL symfony 开发环境。
这里是:
web:
image: nginx:1.13.5
ports:
- "80:80"
volumes:
- ./html:/html
- ./site.conf:/etc/nginx/conf.d/default.conf
links:
- php
php:
image: php:7-fpm
volumes:
- ./html:/html
links:
- postgres
postgres:
image: postgres:9.6.5
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres
现在,我想将 php7.2-intl 安装到我的 php 容器中。所以我想执行类似的操作:
$ sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install php7.2-intl
你能帮帮我吗?我真的被卡住了,而且我没有 Dockerfile 文件,只有一个 docker-compose.yml 文件。
【问题讨论】:
-
为您的 php 映像使用 Dockerfile,然后只需将
build: .替换为image
标签: php postgresql symfony docker nginx