-
Notifications
You must be signed in to change notification settings - Fork 0
Ephemeral installer #35
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
Whereas not absolutely required, I suggest reviewing this PR after merging #34. |
Add ability for scripts that are installed to the system to output a version and build hash.
The script is improved to handle either environments with Docker or Podman in a more effective way: - Do not rely on `docker` shim for podman - Detect which tool exists and execute it directly instead of using shims
Instead of cloning the project and keeping it around, the project is adjusted to be ephemeral, being downloaded to a temp directory just for the installation process. All pertinent yaml or scripts are installed. That said, a dev mode is supported, which will continue the pattern of using symlinks, which is useful for development. Also, improved the installer to not require running as root or with sudo. It will look at the OS flavor and run sudo if necessary. For instance, macOS should not use sudo, but other Linux flavors should. As a result of the entire project not being saved on the system, installation is adjusted to save needed scripts/configurations elsewhere: - Stacks are saved to `/etc/stackname` (or in non-root installations like macOS, they are saved to `$HOME/.stackname`), like /etc/nginxproxymanager. If installing in dev mode, it will bring up the stack using the yaml files right in the repo. - Reusable scripts like `deploy` and `publish` are saved in /usr/bin for Linux flavors and /usr/local/bin for macOS. If installing in dev mode, it will symlink the scripts. Otherwise, it will run `install` to copy the scripts to the bin directory.
c6d9da7 to
5288e3d
Compare
Member
Author
|
☝️ Rebase on main. Note the rebase would've changed the build hash from what I have in the description. |
akamal4
approved these changes
Sep 1, 2025
Contributor
akamal4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, and tested on RHELS9 VM and had no issues.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The improvements in this PR focus around adjusting our project to be an ephemeral installer, rather than a cloned project that permanently resides somewhere on the system.
Obviously, this means any pertinent code that is required for execution must be installed somewhere. So, for stacks, their compose files are general stored in
/etc/stacknamealong with any other configuration they may keep. Additional scripts are stored in/usr/binon Linux systems and/usr/local/binon macOS systems./usr/binor/usr/local/binand stacks are installed at/etc/stackname./usr/binor/usr/local/bin. This is similar to previous behavior, and is handy for actual development of the docker-host project.Additional important improvements:
dockershim in Podman installations. Scripts would use the commandsdockeranddocker-composeeven on Podman installations, just expecting shims to be present to runpodmanandpodman-compose. Now, the scripts intelligently differentiate between docker and podman.Testing
To test, preferably use a fresh OS and run the installer from this branch, like this:
bash <(curl -H 'Cache-Control: no-cache, no-store' -o- https://raw.githubusercontent.com/uicpharm/docker-host/jcurt/podman-and-ephemeral-installer/init.sh) -b jcurt/podman-and-ephemeral-installerDocs
For your convenience, here is a copy of the help screen of the main init.sh script: