Error running ngnix on docker

Hi, I’m a newbie on docker and trying to run ngnix. Below is the error i keep receiving. Please advise…

root@ubuntu-1:~# docker run --restart=always nginx
/ /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/ Looking for shell scripts in /docker-entrypoint.d/
/ Launching /docker-entrypoint.d/ info: Getting the checksum of /etc/nginx/conf.d/default.conf info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/ Launching /docker-entrypoint.d/
/ Launching /docker-entrypoint.d/
/ Configuration complete; ready for start up
2022/06/14 22:33:06 [notice] 1#1: using the “epoll” event method
2022/06/14 22:33:06 [notice] 1#1: nginx/1.21.6
2022/06/14 22:33:06 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2022/06/14 22:33:06 [notice] 1#1: OS: Linux 5.4.0-99-generic
2022/06/14 22:33:06 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2022/06/14 22:33:06 [notice] 1#1: start worker processes
2022/06/14 22:33:06 [notice] 1#1: start worker process 30

I don’t see any error message there. If you want to run nginx in the background, use -d after the run subcommand.

It never goes beyond the start worker process 30

Like @rimelek wrote, there is no error in the logs.

What you see is the output of the entrypoint script and the last 7 lines are application logs from nginx itself.

If you want further logs, you will need to access the nginx container. In order to do so, you need to map one or more ports when creating the container, something like this should do: docker run -p 80:80 --restart=always nginx

May I suggest this free self-paced docker training: Introduction to Containers. It will give you a solid foundation about docker concepts and how things are done in docker.

Thanks. I’ll check the course out.