Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 14: unsupported Compose file version: 1.0 #42

Open
crimsonread opened this issue Jan 26, 2022 · 2 comments
Open

Chapter 14: unsupported Compose file version: 1.0 #42

crimsonread opened this issue Jan 26, 2022 · 2 comments

Comments

@crimsonread
Copy link

crimsonread commented Jan 26, 2022

Exercise
CH14

Problem
When I run docker stack deploy -c stack.yml numbers
The output is unsupported Compose file version: 1.0

Docker version
Client:
Cloud integration: v1.0.22
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:44:07 2021
OS/Arch: windows/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:43:56 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Code version
Latest version

@mikejwhat
Copy link

mikejwhat commented Jun 2, 2022

This took me ages to figure out. It’s because the docker compose config command supports the new ‘compose specification’, therefore it omits the version declaration at the top of the file - however docker stack deploy does not support it and still requires you specify the version (fix = make sure you add the version to the top of the compose file (i.e “version”: “3.8”))

@brian4ko
Copy link

brian4ko commented Feb 12, 2023

thanks for posting this. I also got the same error. I was able to get past it by adding that line and also removing the beginning line "name: numbers". Third step was to remove quotation marks around "80" in the ports section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants