Giter VIP home page Giter VIP logo

Comments (2)

beefsack avatar beefsack commented on June 6, 2024 1

Hi @mihaigalos!

Can you output the content of the file running in the container, and check if the file inside the container is updated?

You can do this using something like:

docker exec -it 3d6e55c660a0 cat /script

Sometimes file mounts fail to update in docker containers because some editors use a separate temporary file while editing, then copy it into place once you complete, and Docker won't update the mounted file in the container in cases like this. This is a known issue with Docker and won't be fixed.

One workaround if you want to use a host mount is to mount a directory instead of the file directly. You could do that using something like:

docker run -d --rm -p 8080:80 -v /path/to/script/dir:/mnt -e SCRIPT=/mnt/script.sh beefsack/webify

from webify.

mihaigalos avatar mihaigalos commented on June 6, 2024

Oh I see.
I use vim which effectively changes the inode because of writing to a separate file and replacing the original, which doesn't reflect in Docker.

Your solution with mounting the whole folder+env var worked - thank you!

from webify.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.