spurin / diveintoansible-lab

Dive Into Ansible Lab
788 stars 498 forks source link

error at docker-compose up #52

Closed ubergoonz closed 2 years ago

ubergoonz commented 2 years ago
ansible@ansible:~/diveintoansible-lab$ docker-compose up
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/

ansible@ansible:~/diveintoansible-lab$ docker-compose version
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020

ansible@ansible:~/diveintoansible-lab$ cat .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/ansible/diveintoansible-lab/config

# Shared home directories
ANSIBLE_HOME=/home/ansible/diveintoansible-lab/ansible_home

Any idea what is wrong? I am new to docker.

spurin commented 2 years ago

Hi @ubergoonz

We’ll get this resolved. What distribution of Linux are you running and how did you install docker-compose, it looks to me like it’s the version of this that’s causing you the issue

spurin commented 2 years ago

Hi @ubergoonz

Closing for now, if there is still an issue then please reach out to me or re-open with the requested information.

Thanks

James