Running the following command results in 404 error in browser for 127.0.0.1:80
or 127.0.0.1:8080
:
docker pull schickling/swagger-ui
docker run -d -p 127.0.0.1:80:80 -e API_URL=http://localhost:4000/swagger schickling/swagger-ui
docker pull swaggerapi/swagger-editor
docker run -p 127.0.0.1:8080:8080 swaggerapi/swagger-editor
The Docker VM for Mac is running and I am exploring this error. Other docker containers have the same problem and the issue seems not related only to Swagger UI.
It works when using the GUI tool Kitematic, but only on the following URL (URL seems to not be mapped to 127.0.0.1
):
http://192.168.99.100:32771/
http://192.168.99.100:32770/#/
Docker processes:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
60f4058c07ef swaggerapi/swagger-editor:latest "http-server --cors -" 2 hours ago Up 5 seconds 0.0.0.0:32770->8080/tcp swagger-editor
28179c1eb01c schickling/swagger-ui:latest "sh run.sh" 3 hours ago Up 3 seconds 0.0.0.0:32771->80/tcp swagger-ui
Is it normal that it maps the ports to 192.168.99.100
? Shouldn't it be in form of 127.0.0.1
? I am running Docker for Mac...