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

Question: Docker - Best way to keep manifest external? #113

Open
leberschnitzel opened this issue Aug 28, 2024 · 10 comments
Open

Question: Docker - Best way to keep manifest external? #113

leberschnitzel opened this issue Aug 28, 2024 · 10 comments

Comments

@leberschnitzel
Copy link

I've implemented your script into a docker image which works pretty well, but sadly I don't manage to reliably keep the manifest outside of the container, so after a container resett the manifest is re-created.
I tried to give an empty manifest file and keep that outside, but that causes errors.
What is your script expecting from the manifest file / the folder where the manifest file is so it would just start filling it like a new script start if nothing is yet in the folder?

@entrhopi
Copy link

Hi!
This is from my experience a permission issue.
But unless you're willing to share your Dockerfile and let others poke around, it is just a wild guess.

@Kalanyr
Copy link
Owner

Kalanyr commented Aug 29, 2024 via email

@leberschnitzel
Copy link
Author

It would only go through the entire library if the container gets rebuild, otherwise the file gets found inside the container.
To map a file to docker, the file needs to exist otherwise the container won't start because of a wrong mapping.
That's why I was trying an empty file, but that didn't work.
I'll try if there's a permission issue.
The whole thing is here btw:
https://github.com/leberschnitzel/gogrepocdock

@leberschnitzel
Copy link
Author

Missclick!

@Kalanyr
Copy link
Owner

Kalanyr commented Aug 29, 2024 via email

@leberschnitzel
Copy link
Author

A minimal manifest would help, or even just the possibility to change the folder of the manifest, like with the download folder.
All not urgent though. Like I said: It works so far, it only is a problem when the container is rebuild, and since there's no need to do so because there are no image updates, it's a non issue :)

Ahh yes , there would be an issue because I never considered the possibility of the manifest existing but being completely blank. I don't think I can support that at the moment. The logic expects a full update on the first run and updates / new on later runs ( unless otherwise specified) and that's determined by the existence of a valid manifest. I've been meaning to play around with storing config settings in the manifest which could help here too, since it would then be possible to generate a minimal manifest that embeds the instruction to do a full update on the next run.

On Fri, 30 Aug 2024, 01:50 leberschnitzel, @.> wrote: It would only go through the entire library if the container gets rebuild, otherwise the file gets found inside the container. To map a file to docker, the file needs to exist otherwise the container won't start because of a wrong mapping. That's why I was trying an empty file, but that didn't work. I'll try if there's a permission issue. The whole thing is here btw: https://github.com/leberschnitzel/gogrepocdock — Reply to this email directly, view it on GitHub <#113 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZ333HZG7QK425YAFCZZ3ZT47K7AVCNFSM6AAAAABNHSTGQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYGIYDIMRXGI . You are receiving this because you commented.Message ID: @.>

@entrhopi
Copy link

In the meantime, you could let the entrypoint.sh git clone/pull the original repository instead of embedding it in the container. That way the manifest, script and everything else can be mounted in a (docker)volume and the games directory in another.

@leberschnitzel
Copy link
Author

In the meantime, you could let the entrypoint.sh git clone/pull the original repository instead of embedding it in the container. That way the manifest, script and everything else can be mounted in a (docker)volume and the games directory in another.

I know where you're coming from and it's not a bad idea, but I'm not a fan of that since a change on the main script could make the image unusable.

@entrhopi
Copy link

In the meantime, you could let the entrypoint.sh git clone/pull the original repository instead of embedding it in the container. That way the manifest, script and everything else can be mounted in a (docker)volume and the games directory in another.

I know where you're coming from and it's not a bad idea, but I'm not a fan of that since a change on the main script could make the image unusable.

True.
Maybe we can persuade @Kalanyr to make more frequent fixed releases of the python file, or you could do some on your repo while they are busy. That way you can reference the released file in your entrypoint.sh which should not break unexpectedly.

@leberschnitzel
Copy link
Author

In the meantime, you could let the entrypoint.sh git clone/pull the original repository instead of embedding it in the container. That way the manifest, script and everything else can be mounted in a (docker)volume and the games directory in another.

I know where you're coming from and it's not a bad idea, but I'm not a fan of that since a change on the main script could make the image unusable.

True. Maybe we can persuade @Kalanyr to make more frequent fixed releases of the python file, or you could do some on your repo while they are busy. That way you can reference the released file in your entrypoint.sh which should not break unexpectedly.

having the file in my repo and synching that would probably really be the savest way to do it, thanks for the idea!

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

No branches or pull requests

3 participants