Mounting development docker container directory on host -


i using docker software development, can bundle dependencies (compilers, libraries, ...) within nice contained environment, without polluting host.

the way things (which guess pretty common): have directory on host contains source code, mounted development container using docker volume, software gets built , executed. volumes being in sync, changes in source reflected within container.

here pitfall: when using code editor, software dependencies considered broken not accessible host. therefore linting, etc... not work.

i able mount, let's /usr/local/include container onto host that, correctly configuring editor, can fix warnings.

i guess docker volume not solution here, because override contained file system...

also, i'm using windows (no choice here) therefore flow is:

windows > samba > linux host > docker > container

and i'd prefer not switching ide (vs code).

any ideas? thank you!

you wish reverse mount volume container host. unfortunately not possible docker, , there variants of question here: how mount directory in docker container host

you're stuck copying files container host. far host path matching /usr/local/include or having use different folder depends upon setup.

the easiest solution not require changing docker image use docker cp copy files.

otherwise, automate having image on entry (after installing dependencies) copy files /tmp/include , mount host volume location.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -