Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove volumes in first compose yaml example #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

2 participants