Skip to content

Conversation

@arxeiss
Copy link

@arxeiss arxeiss commented Jun 11, 2020

In the tutorial, you explain how to use local build instead of image and also running grep hello app.py which should return nothing. But it returns the code, because the volumes section is already there

@obayit
Copy link

obayit commented Nov 14, 2020

I think the volumes is needed. Because he mentioned that it will be useful for development:

We'll later see how this can be useful during development

Any changes on the host machine files in ./flask-app will be "reflected" in the docker container because it is mounted there.

Edit
I see, that later he said editing the local file won't affect the docker container, I wounder if that is true? because the volume is mounted, it should be visible to the container, right?

@arxeiss
Copy link
Author

arxeiss commented Nov 14, 2020

Yes. I see my previous description wasn't great. This is where the problem lives:

Oh no! That didn't work! What did we do wrong? While we did make the change in app.py, the file resides in our machine (or the host machine), but since Docker is running our containers based off the prakhar1989/foodtrucks-web image, it doesn't know about this change. To validate this, lets try the following -

But yeah, because of volumes, it does know about the change.

@obayit
Copy link

obayit commented Nov 15, 2020

Then you are right, it should be removed, to make it not work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants