root@peter:~/docker/farming/web# docker-compose up -d
ERROR: Validation failed in file './docker-compose.yml', reason(s):
services.fred.networks contains an invalid type, it should be an array
Why?
root@peter:~/docker/farming/web# docker --version
Docker version 1.12.0, build 8eab29e
root@peter:~/docker/farming/web# docker-compose --version
docker-compose version 1.6.0, build d99cad6
Try 1.8.0 (1.6.0 is your listed version here) to see if the issue still exists. If not, I recommend filing an issue at https://github.com/docker/compose/issues/new with a minimal reproducible example.
Switching to docker-compose 1.8.0 got the container to start. But the running container says this for the ports: 0.0.0.0:32781->22/tcp, 0.0.0.0:32780->80/tcp
0.0.0.0 means “bind on all interfaces” so it may well be using that container IP just fine, the port output alone will not tell you which IP the container is using. If you check the container’s ip with docker inspect -f {{.NetworkSettings.IPAddress}} is it the expected IP?
BTW, why is it so important that you have a static IP for the container in the first place? Most Docker abstractions rely on dynamically allocated IP addresses / port forwarding / NATing, not static container IPs