Search notes:

docker run -volume

docker run -volume hostPath:imagePath allows to access a host directory or file from the file system of a Docker container.
It is important to specify the -v option before the image name. The following command line results in the error message docker: Error response from daemon: container … encountered an error during CreateProcess: The system cannot find the file specified.
C:\> docker run -it mcr.microsoft.com/windows:1809 -v c:\Users\Rene:c:\host-files
Better is:
C:\> docker run -v c:\Users\Rene:c:\host-files -it mcr.microsoft.com/windows:1809
A path can also be mounted (if this is the correct terminology) read-only:
C:\> docker run -v c:\Users\Rene:c:\host-files:ro -it mcr.microsoft.com/windows:1809

See also

docker cp

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759391192, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/tools/Docker/commands/run/volume(48): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78