Getting error though done the task properly

Hi All,

During docker task level3 : Write a Docker Compose File, I am getting below error and unable to resolve.

The test getting failed saying → docker-compose.yaml is not present App server 3.

Please help.


[root@stapp03 docker]# docker compose up -d
WARN[0000] /opt/docker/docker-compose.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 0/1
⠼ Container httpd Starting 1.4s
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “proc” to rootfs at “/proc”: mount src=proc, dst=/proc, dstFd=/proc/thread-self/fd/8, flags=0xe: no such file or directory: unknown
[root@stapp03 docker]# pwd
/opt/docker
[root@stapp03 docker]# ls -lart
total 12
drwxr-xr-x 1 root root 4096 Jun 9 09:24 …
-rw-r–r-- 1 root root 182 Jun 9 09:51 docker-compose.yaml
drwxr-xr-x 2 root root 4096 Jun 9 09:51 .

Hi @ssinha

Thanks for your feedback,

I’ve just checked it and it’s worked properly from my end.

Could you please try again and share detail about your docker-compose file?

Hi Raymond,

I have retried again in stapp01. It worked now. The difference was: Earlier I was working with root user as /opt/docker did not have permission to create file with user like steve, tony, banner etc. Can it be cause of the issue?

-----------------my docker-compose file----
version: ‘1.0’
services:
apache:
image: httpd:latest
container_name: httpd
ports:
- ‘3001:80’
volumes:
- /opt/data:/usr/local/apache2/htdocs

Hi @ssinha,

I’m not sure about that, but I don’t think the validation checks it. It just makes sure the application can be accessed. After that, you will pass the task.