How can I use a local file on container?

Yes, you can do this. What you are describing is a bind mount. See https://docs.docker.com/storage/bind-mounts/ for documentation on the subject. For example, if I want to mount a folder from my home directory into /mnt/mydata in a container, I can do: docker run -v /Users/andy/mydata:/mnt/mydata myimage Now, /mnt/mydata inside the container will have access to … Read more

Docker – image operating system “windows” cannot be used on this platform

Your Docker host is configured to run Linux containers inside of a VM. To run Windows containers, you need to right click on the Docker icon in the system tray, and select “Switch to Windows containers…” in the Docker menu. This option is not available in “Home” versions of Windows. Documentation is available here.

Network timed out while trying to connect to https://index.docker.io

I had the same problem this morning and the following fixed it for me: $ docker-machine restart default # Restart the environment $ eval $(docker-machine env default) # Refresh your environment settings It appears that this is due to the Docker virtual machine getting itself into a strange state. There is an open github issue … Read more

Is it safe to clean docker/overlay2/

Docker uses /var/lib/docker to store your images, containers, and local named volumes. Deleting this can result in data loss and possibly stop the engine from running. The overlay2 subdirectory specifically contains the various filesystem layers for images and containers. To cleanup unused containers and images, see docker system prune. There are also options to remove … Read more

Docker: How to clear the logs properly for a Docker container?

First the bad answer. From this question there’s a one-liner that you can run: echo “” > $(docker inspect –format=”{{.LogPath}}” <container_name_or_id>) instead of echo, there’s the simpler: : > $(docker inspect –format=”{{.LogPath}}” <container_name_or_id>) or there’s the truncate command: truncate -s 0 $(docker inspect –format=”{{.LogPath}}” <container_name_or_id>) I’m not a big fan of either of those since … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)