Reputation: 4180
How do I find the right compose file version for my docker-compose.yml
file?
I have this:
version: '3.7'
services:
ghost:
container_name: ghost
image: ghost:latest
restart: always
ports:
- 127.0.0.1:2368:2368
volumes:
-v /var/www/myBlog/:/var/lib/ghost
and I have installed Docker Engine - Community version: 19.03.8
How can I know it?
Thanks
Upvotes: 0
Views: 1756
Reputation: 3480
You need to change the volume to below
volumes:
- /var/www/myBlog/:/var/lib/ghost
There is a compatibility matrix between Docker Engine and docker-compose
https://docs.docker.com/compose/compose-file/compose-versioning/
Below is the changelog of docker-compose
and docker
which can help you understand various features available in which version.
Docker-compose:- https://github.com/docker/compose/blob/master/CHANGELOG.md
Docker-ce:- https://github.com/docker/docker-ce/releases
Upvotes: -1
Reputation: 2076
Are you sure about the -v
under your volumes?
Please check the #volume-configuration-reference for docker-compose files.
You need to mention it like below.
volumes:
- /var/www/myBlog/:/var/lib/ghost
Upvotes: 2