Closed morothebest closed 2 years ago
Hi @morothebest
This is an incorrect version of docker-compose. If you install via apt or yum, it is unfortunately an old version. Can you please grab a version from the releases section of the docker-compose github repo. This is what I do in the Linux setup video for reference.
Best Regards
James
@spurin
received the below
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 theversion
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/below is the docker compose.yaml
version: '3.8' # if no version is specificed then v1 is assumed. Recommend v2 minimum
services: ubuntu-c: hostname: ubuntu-c container_name: ubuntu-c image: spurin/diveintoansible:ansible ports:
diveinto.io
ubuntu1: hostname: ubuntu1 container_name: ubuntu1 image: spurin/diveintoansible:ubuntu ports:
diveinto.io
ubuntu2: hostname: ubuntu2 container_name: ubuntu2 image: spurin/diveintoansible:ubuntu ports:
diveinto.io
ubuntu3: hostname: ubuntu3 container_name: ubuntu3 image: spurin/diveintoansible:ubuntu ports:
diveinto.io
centos1: hostname: centos1 container_name: centos1 image: spurin/diveintoansible:centos
image: spurin/diveintoansible:centos-sshd-2222
ports:
- ${CENTOS1_PORT_SSHD}:2222
diveinto.io
centos2: hostname: centos2 container_name: centos2 image: spurin/diveintoansible:centos ports:
diveinto.io
centos3: hostname: centos3 container_name: centos3 image: spurin/diveintoansible:centos ports:
diveinto.io
Docker in Docker
#
Usage: on host that wishes to use docker
#
sudo apt-get update
sudo apt -y install docker.io
export DOCKER_HOST=tcp://docker:2375
docker ps -a
# docker: hostname: docker container_name: docker image: spurin/diveintoansible:dind privileged: yes volumes:
diveinto.io
portal: hostname: portal container_name: portal image: spurin/diveintoansible:portal environment:
networks: diveinto.io: name: diveinto.io