-
Notifications
You must be signed in to change notification settings - Fork 69
Docker support up to v29, cleaned up the code, and fixed some bugs. #21
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
base: master
Are you sure you want to change the base?
Conversation
Append domain name to host name
Only attempt lines trim if the list isn't empty
Handle container rename
Includes .idea and .venv directories to be ignored by Git.
Exclude generated hosts file from version control.
Refactored the Docker event handling to use json parsing for more robust event processing. Updated the hosts file update logic to correctly handle existing sections and ensure atomic writes. Improved container info extraction and error handling.
Includes necessary libraries such as certifi, charset-normalizer, docker, idna, requests, and urllib3.
Add new copyright holder to LICENSE file.
Replaced 'frolvlad/alpine-python3' with 'python:3.14-alpine'. Modified installation to use requirements.txt for dependencies. Updated COPY commands for hoster.py and requirements.txt.
Introduces a Dockerfile for building images, a .dockerignore file to exclude unnecessary files, and a GitHub Actions workflow for automatically building and pushing Docker images to GHCR upon release.
Converts the GitHub repository name to lowercase when constructing the `IMAGE_NAME` for pushing to GitHub Container Registry. This ensures consistency and avoids potential issues with case-sensitive image names.
Ensures the repository name used in the Docker image tag is always lowercase for consistency.
The default docker socket path in hoster.py has been updated from "tmp/docker.sock" to "/tmp/docker.sock" to match the Dockerfile's VOLUME mounting. The Dockerfile has also been updated to use ENTRYPOINT and CMD for better container execution, and the README.md has been updated with the new image name.
Changed dockerClient initialization to None to defer client creation until needed. This may prevent issues with early initialization in certain environments.
Retrieve container ID from 'Actor.ID' and add validation
Improved project description, quick start, and container registration details.
|
This project appears to be unmaintained. It would be great if someone created a fork and continued its development. |
I’ve created a fork, and it’s fully functional with multiple bug fixes: |
|
https://github.com/wollomatic/container-hoster There's also my rewrite in Go |
Brief Change List
docker.APIClienttodocker.DockerClientfor modern API compatibility.hoster.domains).Brief Explanation of Changes and Why
The core updates modernize the Docker API usage and fix bugs like improper hosts file truncation (which lost user-added content) to make the script more reliable and robust—essential for production use. Label support adds flexibility for custom domains, previously unused. Event and file handling improvements prevent crashes and ensure consistency. Formatting changes align with standard
/etc/hostspractices for better readability. Docker package update ensures compatibility with recent Docker releases, avoiding deprecation issues. Python 3.14 upgrade leverages new features like improved error messages and performance. The GitHub Action automates image building/storing on tags, streamlining CI/CD for easier deployments and versioning. All changes keep the script concise while enhancing maintainability.