HTTP code is 500 which indicates error: server error - [object Object]
Expected behavior
Actual behavior
HTTP code is 500 which indicates error: server error - [object Object]
Information about the Issue
windows 10 build 14905.rs_prerelease.160811-1739 Kitematic v0.35.4 Docker version 1.12.0, build 8eab29e docker-compose version 1.8.0, build d988a55
Steps to reproduce the behavior
docker run -d --name docker-hostmanager --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v "C:/Windows/System32/drivers/etc/hosts" iamluc/docker-hostmanager- Click on Enable volume hosts file
Are you using Docker for Windows? Did you make sure to enable file sharing for that specific folder location?
What is the output of the above docker run command without the -d option?
I had the same issue, a work-around for this issue would be to do the following:
docker run -d --name docker-hostmanager --restart=always -v "C:\Windows\Sustem32\drivers\etc\hosts:/etc/hosts" iamluc-docker-hostmanager.
You now map the etc/hosts file in windows to the etc/hosts file in your linux container.
What occurs is that it will take the Windows Path and map that to the path you have specified. If that path is incorrect, it cannot enable Volume Sharing on the specified path (Because it's trying to look for Linux paths in a windows system and then fails).
Kitematic sees the local windows path and can't map it correctly to the container, thus the container stops itself due to it not being able to find the specific path you have tried to share and it causes a 500 error, because the container is no longer running and its output can't be pushed to kitematic UX.
Looking at your command-line I can see you are trying to pull in your windows hosts file into the container (not sure why you would do that, I'm thinking you have hosts in windows that you would like the container to access or provide the container with routes to access other containers? Perhaps link containers if that's the case?).
Other than that, I would suggest that you make a COPY of the file into the container and modify its contents from inside the container to point to the external resources and then map those resources accordingly inside the container if need be.
thanks @inventclem for chiming in on the issue - I'll close this issue as the OP never replied and your solution works.
@inventclem that host manager is modifing that file so i can access the cintainer with an url for web development. So I cant just copy
@FDiskas can't you use localhost as with every other container?
Not possible for my environment. There should be 4 servers running at the same time. All they should be accessible on specific domain. One is backend one is frontend and other is like elasticsearch :bridge_at_night:
frontend is the only thing you hit, correct? Put them all on a Docker network and you can then refer to them by container name. frontend <-- mynet --> backend <-- mynet --> elasticsearch
frontend code will connect to backend API of something like /api/lookup via: http://backend/api/lookup
backend code will connect to elasticsearch via something like http://elasticsearch/_search?q=title:jones&size=5&pretty=true
For the above to work, make sure that you give each container the --name backend and --name elasticsearch flags during the docker run command.
You can then hit your frontend via http://localhost:80 and it'll be able to talk to your backend/elasticsearch.