I am using Docker desktop for Windows – community edition, version 2.4.0.0 (2020-09-28) follow tutorial https://www.youtube.com/watch?v=XrFeRwJjWHI ,
File docker-compose.yml
version: "6.0.8"
services:
redis:
image: redis
volumes:
- ./data:/data
ports:
- 6379:6379
I run command
Microsoft Windows [Version 10.0.19041.508]
(c) 2020 Microsoft Corporation. All rights reserved.
D:docker>docker-compose up
ERROR: Version "6.0.8" in ".docker-compose.yml" is invalid.
D:docker>
I see at here https://hub.docker.com/_/redis has version 6.0.8 . How to fix it?
2
Answers
It is confusing between version of docker-compose and redis. Use value
3.0.8
.Reference: https://docs.docker.com/compose/compose-file/
Version tag is used for specifying docker-compose reference version. You need to choose between existing versions. See https://docs.docker.com/compose/compose-file/
If you want to set redis version you need to use image tag