Skip to content

Mounted directory with withMountedDirectory is not updated on host #6688

Answered by marcosnils
miroljub1995 asked this question in Q&A
Discussion options

You must be logged in to vote

hey there! WithMountedDirectory works the same way as the RUN --mount instruction that you see in Dockerfiles.

It's not bind mounting the files in your machine to the build, what it does is mounting the files from your build context into your pipeline so your resulting container doesn't contain those files in the layered filesystem. If you want the files that you change in your pipeline in your host, you need to use the Export function. There's more info about that here: https://docs.dagger.io/421437/work-with-host-filesystem/#export-a-directory-from-a-container-to-the-host

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@miroljub1995
Comment options

@marcosnils
Comment options

Answer selected by marcosnils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants