Feature Request: Support Containerized Deployment of EasyEngine CLI #1913
dinhngocdung
started this conversation in
Feature Requests
Replies: 1 comment
-
|
I will check on this in this/coming week and then update here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Currently, EasyEngine is primarily designed to be installed natively on a host machine. However, there is an increasing demand for running the EasyEngine CLI within a Docker container (a containerized tool) to achieve better environment isolation, portability, and easier cleanup.
The Requirement
When running EasyEngine inside a container, users typically bind-mount the host's
/etc/hoststo the container so that EE can manage local domain resolution. To make this work seamlessly, the internal file-handling logic needs to be compatible with Docker's mount mechanisms.Current Limitation
The current implementation uses atomic file replacement (e.g.,
Filesystem::dumpFileor creating temporary files and renaming them)./etc/hosts) because it would change the file's Inode, which Docker uses to maintain the link.Proposed Enhancement
I propose updating the
/etc/hostsmanagement functions to use direct stream writing (file_put_contentswithLOCK_EX) instead of atomic replacement.Benefits:
Proof of Concept
I have already implemented and tested this solution in a production-ready Docker image: [dinhngocdung/easyengine](https://hub.docker.com/r/dinhngocdung/easyengine). It has been proven to work reliably without side effects.
I have also submitted a draft PR with the specific code changes here: [Link to your PR #476]
Conclusion
By making this minor adjustment to how system files are edited, we can significantly expand the deployment options for EasyEngine without changing its core architecture.
Beta Was this translation helpful? Give feedback.
All reactions