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

Ubuntu 20.10 - docker up issue #5

Closed
conloos opened this issue Dec 28, 2020 · 7 comments
Closed

Ubuntu 20.10 - docker up issue #5

conloos opened this issue Dec 28, 2020 · 7 comments

Comments

@conloos
Copy link

conloos commented Dec 28, 2020

Hi,

this is my .env:

# sshd ports
UBUNTUC_PORT_SSHD=2221
UBUNTU1_PORT_SSHD=2222
UBUNTU2_PORT_SSHD=2223
UBUNTU3_PORT_SSHD=2224
CENTOS1_PORT_SSHD=2225
CENTOS2_PORT_SSHD=2226
CENTOS3_PORT_SSHD=2227

# ttyd (web terminal) ports
UBUNTUC_PORT_TTYD=7681
UBUNTU1_PORT_TTYD=7682
UBUNTU2_PORT_TTYD=7683
UBUNTU3_PORT_TTYD=7684
CENTOS1_PORT_TTYD=7685
CENTOS2_PORT_TTYD=7686
CENTOS3_PORT_TTYD=7687

# Shared config volume
CONFIG=/home/hostadmin/Workspace/diveintoansible-lab/config

# Shared home directories
ANSIBLE_HOME=/home/hostadmin/Workspace/diveintoansible-lab/ansible_home

After starting docker-compose i get this error:

ERROR: Version in "./docker-compose.yaml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
@spurin
Copy link
Owner

spurin commented Dec 28, 2020

Hi @conloos,

Can you please run docker-compose --version and share the details of the version you are running.

Cheers

@conloos
Copy link
Author

conloos commented Dec 28, 2020

Hi @spurin,

hostadmin@udemy-ansible:~$ docker-compose --version
docker-compose version 1.25.0, build unknown

After installing:

i get it work without the described error.

At the moment the compose is running.

Thanks Frank

@spurin
Copy link
Owner

spurin commented Dec 28, 2020

Thanks @conloos,

I think it may have been an old version of docker or docker-compose that was causing the problem. The following matrix provides version support - https://docs.docker.com/compose/compose-file/

Good to see you've resolved it. I think ... possibly tweaking the version line at the top of the file may have also worked. Will have a look through the spec and see if there's anything actually tying this to 3.8 (which is current).

Hope you enjoy the rest of the course

@spurin spurin closed this as completed Dec 28, 2020
@conloos
Copy link
Author

conloos commented Dec 28, 2020

@spurin now it works

I think

hostadmin@udemy-ansible:~$ apt search docker-compose
Sorting... Done
Full Text Search... Done
docker-compose/groovy,now 1.25.0-1 all [installed]
  Punctual, lightweight development environments using Docker

is not working.

@spurin spurin reopened this Dec 28, 2020
@spurin
Copy link
Owner

spurin commented Dec 28, 2020

Re-opened the issue.

Can you please run and share the the following -

docker-compose --version
docker --version
apt list --installed | grep docker

@conloos
Copy link
Author

conloos commented Dec 31, 2020

Hi @spurin ,

sorry for the delay.

hostadmin@udemy-ansible:~$ docker-compose --version
docker-compose version 1.27.4, build 40524192
hostadmin@udemy-ansible:~$ docker --version
Docker version 20.10.1, build 831ebea
hostadmin@udemy-ansible:~$ apt list --installed | grep docker

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

docker-ce-cli/focal,now 5:20.10.1~3-0~ubuntu-focal amd64 [installed]
docker-ce-rootless-extras/focal,now 5:20.10.1~3-0~ubuntu-focal amd64 [installed,automatic]
docker-ce/focal,now 5:20.10.1~3-0~ubuntu-focal amd64 [installed]

happy new year, greetings frank

PS: To explain the facts again: your containers cannot be started with the "docker-compose",
which is supplied by default with ubuntu 20.04 / 20.10.

After installing:

i get it work without the error described.

@spurin
Copy link
Owner

spurin commented Dec 31, 2020

Wow,

Thanks @conloos for confirming and the detail provided. I imagine that this will be useful also to others.

Appreciate your feedback and wish you the best also, for the new year!

@spurin spurin closed this as completed Dec 31, 2020
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

2 participants