A
A
anykeiwik2018-10-31 12:16:50
Docker
anykeiwik, 2018-10-31 12:16:50

Docker how to connect two containers?

Hello.
How to connect two containers?
Let's say there are two containers with httpd and php. How to make php page open in apache?
How to make them interact?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Radjah, 2018-10-31
@Radjah

As an option to work with fpm/cgi not through a unix socket, but over the network.

;/etc/php/7.0/fpm/pool.d/www.conf
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
;                            a specific port;
;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
;                            a specific port;
;   'port'                 - to listen on a TCP socket to all addresses
;                            (IPv6 and IPv4-mapped) on a specific port;
;   '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = /run/php/php7.0-fpm.sock

T
Talik, 2018-10-31
@Talik0507

Well, what are you.
https://docs.docker.com/engine/reference/commandli...
And to work with some files, you need to forward volumes to containers.
https://docs.docker.com/storage/volumes/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question