As per docker-compose 1.6.0:
You can now specify both a build and an image key if you're using the new file format.
docker-compose build
will build the image and tag it with the name you've specified, whiledocker-compose pull
will attempt to pull it.
So your docker-compose.yml
would be
version: '2'
services:
wildfly:
build: /path/to/dir/Dockerfile
image: wildfly_server
ports:
- 9990:9990
- 80:8080
To update docker-compose
sudo pip install -U docker-compose==1.6.0