Conversation
…ent additional tagging strategies
|
So far looks promising, but I'll have to take a more detailed look at it tomorrow before I approve. I'm really wondering now if we should completely redo the docker build workflow. It's getting very very cluttered with all the environment variables and is nearly unreadable
I have a few words about this. On one hand, Zoraxy already has first-party plugin support for ZT so I think it's appropriate that the Docker users aren't left out, but on the other hand I don't use it (Or even Zoraxy for that matter) and don't have any testing procedures for it other than making sure networks can be created, edited, and removed without issue. Moving it to an external plugin repository would probably allow for more direct contribution from those who actually use it rather than needing me to audit all changes |
|
|
||
| global zoraxy_proc | ||
|
|
||
| mdns_name = getenv("MDNSNAME", "''") |
There was a problem hiding this comment.
could we remove this? it doesn't appear to do anything
| WORKDIR /opt/zoraxy/source/ | ||
|
|
||
| RUN go mod tidy &&\ | ||
| RUN --mount=type=cache,target=/go/pkg/mod \ |
There was a problem hiding this comment.
We already build in stages and Zoraxy is only built once, what is this for?
|
|
||
| RUN apk add --update --no-cache curl make gcc g++ linux-headers openssl-dev nano | ||
|
|
||
| RUN --mount=type=cache,target=/root/.cargo/registry \ |
There was a problem hiding this comment.
Again here, what is this for?
Additionally, the Zoraxy build stage in this Dockerfile looks the same as in the normal Dockerfile. Shouldn't need to also build it here
|
Hey @kjagosz , would you like to make those changes yourself or I will help you to remove those line @PassiveLemon commented and consider unnecessary? |
This PR focuses on improving Docker build performance and restructuring how ZeroTier integration is handled in the project.
The main idea was to make builds faster and cleaner while decoupling ZeroTier from the core image, without breaking existing behavior.
What was changed
New workflow variables
Added new variables in .github/workflows/docker.yml to control build behavior:
Controls whether the main image includes ZeroTier (default: true)
Enables building ZeroTier-specific layers/images (default: true)
Cache tag used for base image layers to speed up rebuilds
Separate cache tag for ZeroTier-related layers
Defines target platforms for buildx (e.g. linux/amd64,linux/arm64)
These variables allow more granular control over builds and significantly improve caching efficiency in CI.
Why
Docker builds were taking longer than necessary and were harder to maintain due to tight coupling between Zoraxy and ZeroTier.
This change:
At the same time, backward compatibility was preserved so existing users don’t notice any difference after updating.
Backward compatibility
No breaking changes.
By default:
Users who don’t need ZeroTier can now disable it and get a lighter build.
Open question / discussion
This PR also opens a design question:
Should ZeroTier remain part of the main repository, or be moved to a plugin/extension model?
Things to consider:
Would be good to align on direction before expanding further in this area.