# Docker webserver cannot be reached

**URL:** <https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608>\
**Category:** General\
**Tags:** docker\
**Created:** [June 27, 2023, 9:11pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608 "2023-06-27T21:11:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![logixx](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@logixx](https://forums.docker.com/u/logixx)\
**Post date:** [June 27, 2023, 9:11pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/1 "2023-06-27T21:11:15Z")

</div>

Hello,

I have Docker running on an externally hosted server.  
I have Docker installed as standard.  
Now I have created an nginx Docker with this command: `docker run -d -p 8080:80 --name webserver nginx.`

 ![image](https://global.discourse-cdn.com/docker/original/3X/9/d/9da762e9e25df540c3d1c7ca998281e941bc4c07.png)

However, I do not get the default web interface of Nginx displayed.

Here is the version of Ubuntu

Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-75-generic x86\_64)

and here the Docker version info:

```auto
root@ubuntu:~# docker version
Client: Docker Engine - Community
version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:00 2023
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f
Built: Thu May 25 21:51:00 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0

```

I can’t get it to call the services as localhost. From external via public IP it does not work either. I have now installed Nginx Local directly on the server. There everything works fine. I come immediately on the starting side of Nginx.

I’m really on the hose and just do not get on.

About help I would be really extremely happy!

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [June 28, 2023, 6:12pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/2 "2023-06-28T18:12:38Z")

</div>

Does “docker logs webserver2” give you anything

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [June 28, 2023, 7:02pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/3 "2023-06-28T19:02:24Z")

</div>

> [@logixx](#):
>
> I have Docker installed as standard.

What do you mean by standard? A shared link could help us to see if you really followed the recommended way, but my guess is that will not be the problem.

> [@logixx](#):
>
> I do not get the default web interface of Nginx displayed.

How did you tried? On which port? Sometimes people just use the wrong port or a wrong ip address.

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [June 29, 2023, 2:18pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/4 "2023-06-29T14:18:49Z")

</div>

How do I look at the logs if it claims the currently running container doesn’t exist?

 ![image](https://global.discourse-cdn.com/docker/original/3X/6/1/6150c5e48bc20a95d307a57e2d27b9877e14d4b8.png)

I’ve been struggling for a week to get any containers running and accessible via the browser including the “getting-started” project from the Documentation.

And now I can’t even look at the logs for a supposed running container because the daemon reports “No such container”

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [June 29, 2023, 2:45pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/5 "2023-06-29T14:45:59Z")

</div>

Hi, i belive you should have opened your own thread for this, but “getting-started” in your case is the image, not the container, to find your containers type: docker ps, or docker ps -a to also see the exited ones

---

<div class="post-metadata">

**Author:** ![logixx](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@logixx](https://forums.docker.com/u/logixx)\
**Post date:** [June 29, 2023, 3:15pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/6 "2023-06-29T15:15:52Z")

</div>

Hi,

The “Webserver2” has a new name = “Webserver”.

root@ubuntu:~# docker ps  
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES  
578d2299e204 nginx “/docker-entrypoint.…” 26 hours ago Up 26 hours 0.0.0.0:8080-\>80/tcp, :::8080-\>80/tcp webserver

Here are the Log files from the docker:

 ![image](https://global.discourse-cdn.com/docker/original/3X/b/c/bcc40cf29ac672f80f1917d47e3354c495d95f7e.png)

---

<div class="post-metadata">

**Author:** ![logixx](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@logixx](https://forums.docker.com/u/logixx)\
**Post date:** [June 29, 2023, 3:26pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/7 "2023-06-29T15:26:17Z")

</div>

> [@rimelek](#):
>
> What do you mean by standard? A shared link could help us to see if you really followed the recommended way, but my guess is that will not be the problem.

I used the Installation Guide from [Docker](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) themselves.

> [@rimelek](#):
>
> How did you tried? On which port? Sometimes people just use the wrong port or a wrong ip address.

I tried with Lynx on Port 80 over Localhost (htt4p://localhost/)

Port 8080 link in the Picture in my first Post htt4p://localhost:8080/.

I wrote the “4” into the URL that i can write more links in this Post.  
it is not a writing error.

I also tried over my Static public IP from the Server via Port 80 and 8080

I used Port 80 not with this Port configuration.  
For this test i created a new docker like this:

docker run -d -p 80:80 --name webserver nginx

But nothing worked

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [June 29, 2023, 4:38pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/8 "2023-06-29T16:38:14Z")

</div>

This is the same thing I’m running into using the “getting-started” tutorial from the Docker Documentation. I haven’t had any luck running anything at all.

@terpz I didn’t open a new thread because it was in response to your logs comment and I’m having the same issue as the op.

Now that I have corrected my typo and looked at the logs for wizardly\_franklin instead of wizardly-franklin. Here is what I’m getting:

```auto
2023-06-29 08:13:20 /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
2023-06-29 08:13:20 /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
2023-06-29 08:13:20 /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
2023-06-29 08:13:20 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
2023-06-29 08:13:20 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
2023-06-29 08:13:20 /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
2023-06-29 08:13:20 /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
2023-06-29 08:13:20 /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
2023-06-29 08:13:20 /docker-entrypoint.sh: Configuration complete; ready for start up
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: using the "epoll" event method
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: nginx/1.25.1
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) 
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: OS: Linux 5.15.90.1-microsoft-standard-WSL2
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: start worker processes
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: start worker process 30
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: start worker process 31
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: start worker process 32
2023-06-29 08:13:20 2023/06/29 14:13:20 [notice] 1#1: start worker process 33

```

But as shown in my first screen shot I only get ERR\_EMPTY\_RESPONSE and can’t access the app. I don’t see any errors in the log but I guess I could be wrong.

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [June 30, 2023, 10:04pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/9 "2023-06-30T22:04:15Z")

</div>

> [@logixx](#):
>
> I tried with Lynx on Port 80 over Localhost (htt4p://localhost/)

Lynx should work, but have you also tried with curl or wget?

What happens if you try these commands?

From the host:

```bash
curl localhost:80

```

From the container

```auto
docker exec -it webserver curl localhost:80

```

> [@logixx](#):
>
> I wrote the “4” into the URL that i can write more links in this Post.  
> it is not a writing error.

You can share as many URLs as you want if you use code blocks which you should anyway 🙂

> [@How to format your forum posts](https://forums.docker.com/t/how-to-format-your-forum-posts/127295):
>
> The Docker forum is using [Discourse](https://www.discourse.org/), which supports several ways to format your posts: Markdown; see [commonmark.org/help](https://commonmark.org/help/) for an interactive tutorial BBCode A small selection of HTML Any combination of the above Blank lines for formatting and readability Quite often you’ll need an empty line above specific formatting to make it work. You also need to type blank lines to create proper paragraphs; just pressing Return once and then typing a new block of text right below a previous block only …

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [June 30, 2023, 10:15pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/10 "2023-06-30T22:15:04Z")

</div>

> [@fatdollar](#):
>
> This is the same thing I’m running into using the “getting-started” tutorial from the Docker Documentation.

@fatdollar You just forwarded port 3000 from the host to port 3000 in the container but the getting-started container listens on port 80 which is the default port of nginx not port 3000. @logixx forwarded the host port to the right container port. The port on the right side is always the container port.

```bash
docker run -dp 127.0.0.1:3000:80 getting-started

```

The above command should allow you to access the webpage from the browser on port 3000.

---

<div class="post-metadata">

**Author:** ![logixx](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@logixx](https://forums.docker.com/u/logixx)\
**Post date:** [June 30, 2023, 10:19pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/12 "2023-06-30T22:19:12Z")

</div>

Offcource i tried curl over port 80

An 8080 but it run into nothing.

Today i installed docker local with the same steps and it worked instantly.

I wrote to the serverhost I hope they can give me an answer. Cause it just dont work on there server.

But an answer of this problem would be nice that I dont be dependent from the hoster

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [June 30, 2023, 10:32pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/13 "2023-06-30T22:32:56Z")

</div>

![Screenshot_20230630-162857](https://global.discourse-cdn.com/docker/original/3X/8/d/8d910d612fa4cc2ce048bb5f6fa8086989e7982c.png)

If that’s the case then the tutorial is incorrect. As per the screenshot of the tutorial I posted above.

---

<div class="post-metadata">

**Author:** ![logixx](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@logixx](https://forums.docker.com/u/logixx)\
**Post date:** [June 30, 2023, 10:44pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/14 "2023-06-30T22:44:12Z")

</div>

> [@fatdollar](#):
>
> If that’s the case then the tutorial is incorrect. As per the screenshot of the tutorial I posted above.

I looked an I found this [Docker Guid](https://www.docker.com/blog/getting-started-with-docker-desktop/)

In this Guide they give you this command:

```auto

docker run -d -p 80:80 docker/getting-started

```

So in this case its port 80

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [June 30, 2023, 11:27pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/15 "2023-06-30T23:27:45Z")

</div>

Please, share a link next time to the website you are using instead of a screenshot so we can find it faster. I found it and now I know I was wrong. The `docker/getting-started` image indeed contains an nginx that listens on port 80, but the image you created following the guide doesn’t use that. It runs nodejs and I tried it on my machine (MacBook running Docker Desktop for Mac) and port 3000 worked for me with the command that the guide mentions. I don’t have more time at the moment to investigate this issue, but is either something Windows specific or you made a mistake somewhere, but I wouldn’t be surprised by a Windows specific issue either.

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [July 6, 2023, 5:21pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/16 "2023-07-06T17:21:25Z")

</div>

I’m leaning towards it being a Windows issue to then. I just got back from a long holiday vacation so I’ll be trying to install this on my desktop server that is sort of my sand box to try things out. It is running Ubuntu so if the tutorial works I’ll just assume its windows related.

Thanks,

---

<div class="post-metadata">

**Author:** ![logixx](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@logixx](https://forums.docker.com/u/logixx)\
**Post date:** [July 6, 2023, 5:31pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/17 "2023-07-06T17:31:53Z")

</div>

I found the error of my problem… The docker demon got no IP adress…

You looked with:

`ip addr`

Could be this the same error?

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [July 6, 2023, 8:16pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/18 "2023-07-06T20:16:02Z")

</div>

Actually it could be that would make sense. However it looks like my Docker does have an IP.

```auto
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:61:a6:7e:1d brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:61ff:fea6:7e1d/64 scope link
       valid_lft forever preferred_lft forever

```

Docker is on a completely different subnet than the rest of my network. Do I have to add some kind of port forwarding? Or a bridge?

Also it says the the state for docker0 is DOWN. Probably another reason it’s not working…

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [July 7, 2023, 2:42pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/19 "2023-07-07T14:42:30Z")

</div>

OK I have figured out the issue on my end as well. I was not in the `getting-started/app` folder I was in the `getting-started` root folder and once I changed folders all was well.

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [July 7, 2023, 8:36pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/20 "2023-07-07T20:36:57Z")

</div>

> [@fatdollar](#):
>
> Docker is on a completely different subnet than the rest of my network. Do I have to add some kind of port forwarding? Or a bridge?

That docker0 is the bridge. The default bridge which is DOWN until a container uses it. The port forward already happened with using `-p 3000:3000`

---

<div class="post-metadata">

**Author:** ![fatdollar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fatdollar/32/41829_2.png) [@fatdollar](https://forums.docker.com/u/fatdollar)\
**Post date:** [July 7, 2023, 8:38pm UTC](https://forums.docker.com/t/docker-webserver-cannot-be-reached/136608/21 "2023-07-07T20:38:19Z")

</div>

Thanks. That’s how I assumed it was working. It was just user error on the build folder. Thanks for the help.
