Reputation: 17745
I'm trying to delete the logs of my containers. I'm using docker for mac. For instance this command for the elasticsearch container
docker inspect --format='{{.LogPath}}' elasticsearch
will output
/var/lib/docker/containers/d4d426c49ee91447797e482b86b1eb5fd51f6a9257dd1f3a2391895abecf2b56/d4d426c49ee91447797e482b86b1eb5fd51f6a9257dd1f3a2391895abecf2b56-json.log
I know that this is not in my filesystem, but in the VM. When I used dinghy with VirtualBox I entered the machine with
docker-machine ssh :machine_name
With dinghy it was dinghy
, in other cases it would be default
.
And then I just deleted the log file.
I'm trying to get the active machine used in docker for mac with
docker-machine ls
but no machine is registered. I'm executing this
eval $(docker-machine env)
And the output is this
Error: No machine name(s) specified and no "default" machine exists.
I get the same output when I execute
docker-machine ip
Here a user says that with this setup we no longer have access to docker machine, which is fine, but is there a way to delete the logs?
https://forums.docker.com/t/how-to-find-docker-machine-ip-in-commandline-in-docker-beta-os-x/9844/5
Upvotes: 4
Views: 1375
Reputation: 1037
Although this question is quite old and may have been answered somewhere else: The reason why this doesn't work is that Docker For Mac does not use a docker-machine managed virtual machine. See docs.docker.com/machine/get-started/#prerequisite-information. It is using a Hyperkit lightweight engine.
Upvotes: 2