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

run the install script as an entrypoint and not a cmd #36

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

QuintenQVD0
Copy link
Contributor

@QuintenQVD0 QuintenQVD0 commented Aug 15, 2024

This change is here for something very specific and not widely tested (yet).

I am making an egg for TiltedEvolution (SkyrimTogetherServer) and to get the server files they get pulled out of the install image as that are the only build server files and building them takes way to long.

The problem is that, that image entrypoint directly launches the game so the install script would never run. This is because we pass it to the cmd argument what runs after the entrypoint but of course that would never exit.

This PR forces to clear the cmd out of the selected image (if it has set one) and run the install script as the entrypoint.

edit: this does not work (turning the logic arround)
If wanted I could turn this arround and clear the entrypoint field and use the cmd field if wanted

@@ -403,7 +403,8 @@ func (ip *InstallationProcess) Execute() (string, error) {
AttachStdin: true,
OpenStdin: true,
Tty: true,
Cmd: []string{ip.Script.Entrypoint, "/mnt/install/install.sh"},
Entrypoint: []string{ip.Script.Entrypoint, "/mnt/install/install.sh"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set the entrypoint to nil and the command would stay the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that. It does not work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this throw an error or anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Just does not set it at all. I have to redo this as it brakes images with a cmd set.

@QuintenQVD0 QuintenQVD0 marked this pull request as draft September 24, 2024 15:31
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