Docker container issue errror

faced error: - container ‘nautilus’ is not running or its configuration was alterted on App Server 1
FAILED test_container_issues.py::test_container_issues - AssertionError: - co…

I cannot able to run this Nautilus on app server 1. Please anyone correct me. thanks in advance

Hi @DD1

How did you try to fix the issue ?

Container’s volume (/usr/local/apache2/htdocs) is mapped with the host’s volume (/var/www/html).
The website should run on host port (8080) on (App Server 1) i.e command (curl http://localhost:8080/) should work on (App Server 1).

[root@stapp01 ~]# docker run -d -v /var/www/html:/usr/local/apache2/htdocs -p 80:8080 --rm httpd:latest this command to use to in this task. how to run the nautilus

Please use the given user and not root for each server : Nautilus
Please use : docker ps -a to see all container (you will find the container is exiting mode).
The container is not in valid state but you will see the container name and the container id.
use the container id or the name “nautilus” to restart the webserver

docker restart nautilus

Now you can use the curl command and it should work

1 Like

yeah, it worked now. Thank

Good to know
You’re welcome

1 Like

you are welcome too…

Nautilus container is stopped just trying starting it and the try curl, worked for me

1 Like

Yeah I done that project… As you said

docker restart nautilus

1 Like

this is not good, i am actually remove the container then created a new container with same name “Nautilus” and i can actually curl the url http://localhost:8080/ and it saying “IT WORKS”
but when i submitted the task, it failed. but yeah i should understand after removing container will remove the persistent host on the container which i didn’t attached it when i have created the new container with same name.
i hope i have understood my mistake correctly.

below i am pasting my steps what i did.

"[tony@stapp01 ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
68e5fb380f55 httpd “httpd-foreground” About a minute ago Exited (0) 4 seconds ago practical_pike
5dd952e05714 httpd “httpd-foreground” 20 minutes ago Exited (0) 20 minutes ago nautilus
[tony@stapp01 ~]$ docker rm 68e5 5dd95
68e5
5dd95
[tony@stapp01 ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[tony@stapp01 ~]$ docker run --name nautilus -p 8080:80 -d httpd
a903492f91a4ac0f4e74dc5dda47ca8b098329e20cbc81c6f087f71bb4d818f9
[tony@stapp01 ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a903492f91a4 httpd “httpd-foreground” 7 seconds ago Up 4 seconds 0.0.0.0:8080->80/tcp nautilus
[tony@stapp01 ~]$ curl http://localhost:8080/

It works!

[tony@stapp01 ~]$ "