rancher-desktop: Containers unable to internally bind port 80

Actual Behavior

When I start a container that will internally use port 80 (even though it’s externally mapped using a port other than 80), it will not start, saying that port 80 is in use.

Steps to Reproduce

This occurs anytime I run any image that expects to internally use port 80. For example the base nginx container will crash after it starts, saying that it is unable to bind the port:

docker run --name some-nginx -p 10202:80 nginx

You can also run it without specifying any port mapping, and it will fail the same way.

Result

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/04/21 16:29:56 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2023/04/21 16:29:56 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2023/04/21 16:29:56 [notice] 1#1: try again to bind() after 500ms
2023/04/21 16:29:56 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2023/04/21 16:29:56 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2023/04/21 16:29:56 [notice] 1#1: try again to bind() after 500ms
2023/04/21 16:29:56 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2023/04/21 16:29:56 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2023/04/21 16:29:56 [notice] 1#1: try again to bind() after 500ms
2023/04/21 16:29:56 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2023/04/21 16:29:56 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2023/04/21 16:29:56 [notice] 1#1: try again to bind() after 500ms
2023/04/21 16:29:56 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2023/04/21 16:29:56 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2023/04/21 16:29:56 [notice] 1#1: try again to bind() after 500ms
2023/04/21 16:29:56 [emerg] 1#1: still could not bind()
nginx: [emerg] still could not bind()

Expected Behavior

Docker containers should internally be able to bind to port 80 (though I don’t expect to map them to port 80 externally)

Additional Information

No response

Rancher Desktop Version

1.8.1

Rancher Desktop K8s Version

Kubernetes has been disabled

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 11 Enterprise 22H2

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

FortiClient VPN

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@yevon Yes, that bug was already fixed and will be included in our official next release. However, there is a tech preview release that does have that fix and you can use it right now.

https://github.com/rancher-sandbox/rancher-desktop/releases/tag/v1.9.0-tech-preview

Also, going to close this issue, feel free to reopen it if you encounter any additional problems regarding this.