That’s interesting, docker-compose ps
returned
Name Command State Ports
-------------------------------------------------------
test_web_1 npm start Up 0.0.0.0:8080->8080/tcp
docker-compose exec web curl localhost:8080
hello|world
```
and pinata list
These are advanced configuration settings to customise Docker.app on MacOSX.
You can set them via pinata set .
hostname = docker
Hostname of the virtual machine endpoint, where container ports will be
exposed if using nat networking. Access it via ‘docker.local’.
hypervisor = native (memory=2, ncpu=4)
The Docker.app includes embedded hypervisors that run the virtual machines
that power the containers. This setting allows you to control which the
default one used for Linux is.
▸ native: a version of the xhyve hypervisor that uses the MacOSX
Hypervisor.framework to run container VMs. Parameters:
memory (VM memory in gigabytes), ncpu (vCPUs)
network = hostnet (docker-ipv4=192.168.65.2, host-ipv4=192.168.65.1)
Controls how local containers can access the external network via the
MacOS X host. This includes outbound traffic as well as publishing ports
for external access to the local containers.
▸ hostnet: a mode that helps if you are using a VPN that restricts
connectivity. Activating this mode will proxy container network
packets via the Docker.app process as host socket traffic.
Parameters: docker-ipv4 (docker node), host-ipv4 (host node)
▸ nat: a mode that uses the MacOS X vmnet.framework to route container
traffic to the host network via a NAT.
filesystem = osxfs
Controls the mode by which files from the MacOS X host and the container
filesystem are shared with each other.
▸ osxfs: a FUSE-based filesystem that bidirectionally forwards OSX
filesystem events into the container.
native/port-forwarding = true
Expose container ports on the Mac, rather than the VM
▸ true: Container ports will be exposed on the Mac
▸ false: Container ports will be exposed on the VM
daemon = run ‘pinata get daemon’ or 'pinata set daemon [@file|-]>
JSON configuration of the local Docker daemon. Configure any custom
options you need as documented in:
https://docs.docker.com/engine/reference/commandline/daemon/. Set it
directly, or a @file or - for stdin.
here’s docker-compose.yml content:
version: “2”
services:
web:
image: node:latest
command: npm start
working_dir: /usr/src/app
ports:
- 8080:8080
volumes:
- .:/usr/src/app
the interesting thing is when I run screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
, then do curl localhost:8080
I get curl: (7) Failed to connect to localhost port 8080: Connection refused