Cloudflare WARP VPN not working with docker on Ubuntu - docker

I have installed warp-cli on ubuntu successfully. Everything works fine except docker. When I run a docker container like docker run -p 9000:8000 docker/image the container is not accessible on localhost:9000.
Thanks!

Related

Switching from Docker Desktop to Colima - no localhost access

Trying to switch to colima from Docker Desktop on mac but having issues reaching my containers on localhost.
Removed Docker Desktop and installed colimna/docker w homebrew. Colima starts fine.
I have a command that I use to run Dynamo:
docker run --name dynamodb -d -p 8000:8000 amazon/dynamodb-local"
When I was using Docker Desktop I could reach the database on localhost:8000. Now it's only accessible on 127.0.0.1:8000
My /etc/hosts correctly maps localhost - this is an issue with the switch. Not finding much online regarding this - any ideas? It seems that docker no longer recognizes localhost as an alias for 127.0.0.1 after the switch. Not using Kubernetes or docker compose.

Docker Swarm, Windows Containers, ingress network (Routing Mesh) on Windows Server 2019

I want to build docker swarm cluster on windows. To do this I choose Windows Server 2019 in 1809 Version. I work on my local machine and using Vagrant box vm.box=StefanScherer/windows_2019 I created enviroment for developing purposes.
Set Hostname.
Set private network (192.168.52.100)
Install Docker-EE
On this Windows I have installed docker-ee by using command Install-Package Docker -ProviderName DockerMsftProvider -RequiredVersion 19.03 -Force, and docker work perfectly.
docker version return everething ok
docker run -it --rm -p 8000:80 --name aspnetcore_sample mcr.microsoft.com/dotnet/core/samples:aspnetapp -> also work perfectly.
My first issue is when I perform command docker swarm init --advertise-addr=192.168.52.100 I notice my internet connection is lost for a while (also init/join/leave).
And the secound issue is routing mesh, it is not working
Steps to reproduce:
docker service create --publish published=8050,target=80,mode=ingress --name aspnetcore_sample mcr.microsoft.com/dotnet/core/samples:aspnetapp
Open web browser http://127.0.0.1:8050/ (on machine where I init swarm)
Now I should have access to this sample app under 8050 port. But http://127.0.0.1:8050/ is not working
I know I can use mode=host but I think mode=ingress should work.
I also checked it with the same commands on linux and it works without any problem
How can I resolve this issue?

Unable to connect localhost using HyperV Container on Win10 1903

I was just upgraded to Windows 10 1903 from 1809, then my docker become a little bit weird. Here are my current situation:
OS: Microsoft Windows [ver 10.0.18362.116]
Hyper-V: Installed. I have only one VSwitch called Default Switch.
I reinstalled Docker Desktop for Windows v2.0.0.3. (Docker version 18.09.2, build 6247962)
The docker can run without problem. Only the network issue!
Here is what I tried:
Run iis container in "process" isolation mode.
docker run -d --rm -p 80:80 --isolation process mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903
I can connect to port 80 through localhost.
Run iis container in "hyperv" isolation mode.
docker run -d --rm -p 80:80 --isolation hyperv mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903
I can't connect to port 80 through localhost. I was okay before I upgrade to Windows 10 1903.
I almost tried everything I can try. I just can't get my localhost (loopback interface) works.
I tried on the other machine. When docker started, there is a nat VSwitch will be created by docker. It doesn't work on my machine.
I tried to create a new VMSwitch and named nat but doesn't works.
I tried to run .\WindowsContainerNetworking-LoggingAndCleanupAide.ps1 -Cleanup -ForceDeleteAllSwitches using this script. Restart the computer. It doesn't works.
I completely removed Hyper-V and Docker. Reinstall again doesn't works.
I tried to list networks defined in hnsdiag. (hnsdiag list networks) Then deleted the nat network. Restart the HNS service. Restart Docker again. It doesn't work.
May I ask what else I can do for my docker network settings?

No connectivity between EC2 instance and Docker container

I have an EC2 instance (Ubuntu 16.04 ami-ba602bc2) deployed. I've installed docker on it and downloaded a Docker container that runs JasperReports in Tomcat. I've tested this Docker container on my laptop and it works correctly. I downloaded and started the Docker container on the EC2 instance with
docker run -itd -p 8080:8080 dwschulze/jasperreports.server.v7.1.ubuntu.16.04:latest
the same command I use locally to run on my laptop. docker ps shows the container running. I've opened port 8080 in the AWS security group.
I've also connected to the Docker container and verified that the tomcat instance is running.
I can't connect to the reports server from the internet. I've also tried telnet localhost 8080 from the EC2 instance and it times out.
Everything I've read says that I should be able to run a Docker container on an EC2 instance, but it can't even connect locally.
Any ideas?
Thanks.
My problem was that I was running in a t2.small which is too small to even run Tomcat (let alone Jasper Reports) reliably. I switched to a t2.xlarge and problem solved.

Accessing localhost of a docker container from the host

I am running the cloudera docker quickstart image (on windows) as explained on the this page.
I run it using:
docker run --hostname=quickstart.cloudera --privileged=true -t -i -p 7180:7180 -p 9080:9080 cloudera/quickstart:latest
It runs fine, I am able to run cloudera manager and access it using the url http://192.168.99.100:7180. So far so good. I also use tomcat with a simple app on localhost:9080 inside this same container. How do I access it on my host? I tried using http://192.168.99.100:9080 but it does not work.
Update: I fixed it by using the vm ip i.e. 192.168.99.100 instead of localhost for the server. Now it works. Thanks.

Resources