Non so se sono nel forum adatto (eventualmente chiedo scusa), cmq ecco il mio problema
+ curl localhost
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
bla bla bla...
Tutto ok, ma adesso proviamo dall'interno di un contenitore docker
+ cat Dockerfile
FROM php:7.2.2-cli
+ cat test.sh
#!/bin/bash -e
cd $(dirname "$0")
docker build --network host -t test-image .
docker run test-image curl localhost
+ ./test.sh
Sending build context to Docker daemon 4.096 kB
Step 1/1 : FROM php:7.2.2-cli
---> 21c3582549e6
Successfully built 21c3582549e6
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 80: Connection refused
Perchè non funziona?