Deploy an App on Docker Containers task failed

Continuing the discussion from Deploy an App on Docker Containers:

Task Status - Failed – could U please explain why this task failed
Seems like host volume ‘/var/www/html’ is not mapped correctly with ‘php_apache’ container volume on Applicaton Server 2

please find the below docker file and I have got the web page from jump host

root@stapp02 devops]# docker-compose config
services:
mysql_apache:
environment:
MYSQL_DATABASE: database_blog
MYSQL_ROOT_PASSWORD: Pa$$W0rD
image: mariadb:latest ports:
- 3306:3306/tcp
volumes:
- /var/lib/mysql:/var/lib/mysql:rw
php_apache:
depends_on:
- mysql_apache
image: php:apache
ports:
- 8081:80/tcp
volumes:
- /var/www/html:/var/www/html:rw
version: ‘3.0’

Web page from Jump host .

hor@jump_host /$ curl 172.16.238.11:8081/

Welcome to xFusionCorp Industries!
<body>
    Welcome to xFusionCorp Industries!    </body>
thor@jump_host /$

Hi @Inderpreet Can you help me in understand why I failed my task?
Everything look good to me

version: ‘3.1’

services:
php_host:
image: php:rc-apache
ports:
- 6000:80
volumes:
- /var/www/html:/var/www/html

mysql_host:
image: mariadb:latest
restart: always
ports:
- 3306:3306
volumes:
- /var/lib/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: Ir0nM@n
MYSQL_DATABASE: database_apache
MYSQL_USER: root
MYSQL_PASSWORD: BigGr33n

@Ayman @kodekloud-support3 @Inderpreet
Hey guys,
It seem there is a bug in this task, I failed due to:
- Seems like host volume '/var/www/html' is not mapped correctly with 'php_host' container volume on App Server 2

But I was able to check volume mapping was made correctly, please check:


@mmumshad @Inderpreet @Ayman @kodekloud-support3

Could some one double check this? thank you

Hi, @andrescaroc

You have not specified the container_name for the “web” and “db” containers. Thus, the validation system was unable to match the volume with the container name