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

feature: remove /config from the Dockerfile VOLUME instruction #126

Merged
merged 2 commits into from
Sep 15, 2024

Conversation

sjiep
Copy link
Contributor

@sjiep sjiep commented Sep 5, 2024

Addresses #125

@maxisam you mentioned to let it stay for a week, so feel free to merge whenever you are comfortable.

Perhaps you could already make a release with dev tag so that I can test it from my side?

@maxisam maxisam mentioned this pull request Sep 5, 2024
@maxisam
Copy link
Owner

maxisam commented Sep 5, 2024

https://github.com/maxisam/mgob/actions/runs/10722607810/job/29748977592

build doesn't pass with this change

@sjiep
Copy link
Contributor Author

sjiep commented Sep 6, 2024

From the logs I can't tell why the endpoints are not available. It just exits with the following error.

curl: (7) Failed to connect to 127.0.0.1 port 8090 after 0 ms: Connection refused

In principle, the issue I'm having is that only the config shouldn't be stored in an anonymous volume as this causes rebuilds with different values not to be picked up. Also the config is known at build time and is used for reading only, so having it stored in a volume makes little sense to me and should just be part of the image (or via a bind-mount to host if you don't build an image from it).

I've put the VOLUME instruction back, but only removed the "/config" entry. It is hard for me to tell if this will actually fix the build, but can you give it a try?

@maxisam
Copy link
Owner

maxisam commented Sep 6, 2024

It works now

@sjiep
Copy link
Contributor Author

sjiep commented Sep 9, 2024

I've tested with dev.295 and can confirm that changes to yaml files in config are now properly picked up after rebuilding a new image from a Dockfile with mgob as base image.

@sjiep sjiep changed the title feature: remove the Dockerfile VOLUME instruction feature: remove /config from the Dockerfile VOLUME instruction Sep 9, 2024
@maxisam
Copy link
Owner

maxisam commented Sep 9, 2024

@sjiep Thanks for testing. So the new image will use your config properly if you use the public build as a base right?

@sjiep
Copy link
Contributor Author

sjiep commented Sep 9, 2024

Sorry, I had a typo in my message. It was typed as not instead of now now 😅 (I've edited the original message).

Just to be sure we are talking about the same thing, with the following Dockerfile

FROM maxisam/mgob:dev.295

COPY ./gpg/key.gpg.pub /gpg/
COPY ./config/plan.yml /config/

Making changes to the ./config/plan.yml and triggering a new build, docker compose up --build in this case, will cause the changes to be picked up immediately whereas before they weren't.

@maxisam
Copy link
Owner

maxisam commented Sep 9, 2024

Cool, that is what I thought. I was a bit confused earlier 😆 I will merge this Friday. Pls remind me if I don't. Thanks!

@sjiep
Copy link
Contributor Author

sjiep commented Sep 15, 2024

Cool, that is what I thought. I was a bit confused earlier 😆 I will merge this Friday. Pls remind me if I don't. Thanks!

@maxisam, a small reminder for merging 😉

@maxisam maxisam merged commit ea6da73 into maxisam:main Sep 15, 2024
1 check failed
@maxisam
Copy link
Owner

maxisam commented Sep 15, 2024

Thanks! Completely forgot...I was on a business trip and the flight got cancelled.Totally messed up my plan and forgot about this.

@sjiep sjiep deleted the feature/remove-docker-volume-instruction branch September 15, 2024 18:53
@sjiep
Copy link
Contributor Author

sjiep commented Sep 15, 2024

@maxisam, I have still one small favor to ask, could you make a release?

@maxisam
Copy link
Owner

maxisam commented Sep 16, 2024

here you go, https://github.com/maxisam/mgob/releases/tag/2.0.24

Thanks for the contribution 😊

danielchristianschroeter pushed a commit to danielchristianschroeter/mgob that referenced this pull request Nov 6, 2024
…isam#126)

* Removed the Dockerfile VOLUME instruction

* Only removed config from the VOLUME instruction

---------

Co-authored-by: Robert van Kints <robert.van.kints@integral-learning.de>
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.

3 participants