Troubleshooting problems
Log collection
To copy logs from container to the host, enter the following command:
docker cp <containerId>:/file/path/within/container /host/path/target
If you want to navigate the Docker® container to find log files, enter the following command:
docker exec -it [container-id] bash
Errors in the Docker registry
The Docker registry can be a source of errors, which might occur when you run docker push
commands. You might see errors like the following:
Get https://minikube.local:5000/v2/: http: server gave HTTP response to HTTPS client
Get http://minikube.local:5000/v2/: dial tcp 192.168.39.112:5000: connect: no route to host
The errors can occur if the registry is not properly configured. Some ways to investigate the errors are as follows as per your platform:
Ensure that the IP reflected by the minikube ip
command is specified in the following locations:
/etc/hosts
- Ensure that there is aminikube.local
entry that matches the Minikube IP address. If necessary, modify the file./etc/docker/daemon.json
- Ensure that the specified subnet matches the Minikube IP address. If necessary, edit the file and restart the Docker service. You must also restart ChartMuseum.minikube start
command--insecure-registry
option - When you use this command, ensure that the specified subnet matches the Minikube IP.
For the Minikube insecure registry the following is covered in the Minikube topic:
- Ensure that if Minikube has been stopped (e.g., from a reboot) that you have restarted and redeployed using a “fresh” Minikube VM (
minikube delete
first). - Ensure the
--insecure-registry
option on theminikube start
command reflects the appropriate value as indicated in the Minikube handbook:--insecure-registry "10.0.0.0/24"
. - Only if not using Docker inside the Minikube VM (
minikube docker-env
): Confirm the location of your Dockerdaemon.json
file (C:\ProgramData\Docker\config\daemon.json
or$env:USERPROFILE\.docker\daemon.json
, depending on your installation) and ensure it specifies a matchinginsecure-registries
setting.
Confirm the registry with the following command:
curl http://minikube.local:5000/v2/_catalog
The command should return a result similar to:
{"repositories":["batch","curam","httpd","rest","servercode","utilities","xmlserver"]}