-
Notifications
You must be signed in to change notification settings - Fork 496
Improve Dockerfile #1962
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?
Improve Dockerfile #1962
Conversation
zguig52
commented
Jan 9, 2026
- add curl for HTTPS healthchecks (Docker - add curl - wget from alpine cannot implement healthcheck with HTTPS enabled #1961)
- remove forced port binding from CMD to allow config file use(Cannot change listening hosts through config file in docker container due to forced host command #1960)
- remove default TCP port EXPOSE command as it is not really usefull (https://forums.docker.com/t/what-is-the-use-of-expose-in-docker-file/37726)
- add curl for HTTPS healthchecks (Kozea#1961) - remove forced port binding from CMD to allow config file use(Kozea#1960) - remove default TCP port EXPOSE command as it is not really usefull (https://forums.docker.com/t/what-is-the-use-of-expose-in-docker-file/37726)
|
@kalsi-avneet - any ETA for review? |
Sorry for the delay. I had a busy week. I have reviewed the PR and am waiting for the reply to my request in #1960 (comment) :
Here is my review: changes proposed in this PR
My review
This proposed change would allow the user to allow changing the port inside the docker container by reading the config file. The current behavior of Radicale's docker is that the user does not need to specify a port for inside the container. My question/comment about Additionally, the @pbiering , would it be possible to add the maintainer of Cloudron packaging as a reviewer too? Footnotes |
Name? Potentially you have to mention first and then I can add. |
Oh, I was hoping you might know 😅 Let me see if I can figure out from the documentation or code |
I could not find maintainer's name in documentation Lines 2683 to 2706 in 4fb1672
|
| EXPOSE 5232 | ||
| # Run Radicale | ||
| ENTRYPOINT [ "/app/bin/python", "/app/bin/radicale"] | ||
| CMD ["--hosts", "0.0.0.0:5232,[::]:5232"] |
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.
@zguig52 ,
Could you revert only this line?
The reason, as I have mentioned in #1962 (comment) is that a docker container created without this line would require the user to explicitly declare hosts = 0.0.0.0:<PORT> in the config file explicitly, even if defaults are not changed.
I am not 100% sure, but I am concerned that this might impact cloudron packaging.
Till it is confirmed, the other 2 changes in the PR can be merged.
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.
Here it is. I did not thought about the broad impact for existing deployments
@zguig52 ,
Thank you for reverting the line.
Although there would be no difference functionally, I would like to request a small change : Currently in the diff of this PR, it seems that the line CMD ["--hosts", "0.0.0.0:5232,[::]:5232"] has moved. Could you modify it such that there is no change in this line (since the change has been reverted)
Here is an example to demonstrate my request:
Current diff:
@@ -19,16 +19,14 @@ WORKDIR /app
RUN addgroup -g 1000 radicale \
&& adduser radicale --home /var/lib/radicale --system --uid 1000 --disabled-password -G radicale \
- && apk add --no-cache ca-certificates openssl
+ && apk add --no-cache ca-certificates openssl curl
COPY --chown=radicale:radicale --from=builder /app/venv /app
# Persistent storage for data
VOLUME /var/lib/radicale
-# TCP port of Radicale
-EXPOSE 5232
# Run Radicale
ENTRYPOINT [ "/app/bin/python", "/app/bin/radicale"]
-CMD ["--hosts", "0.0.0.0:5232,[::]:5232"]
USER radicale
+CMD ["--hosts", "0.0.0.0:5232,[::]:5232"]Note how this diff seems to contain 3 changes:
- Install curl
- Remove
EXPOSE 5232 - Delete the
CMD ["--hosts" ...line from below theENTRYPOINT ...line and place it below theUSER radicaleline
Requested diff
@@ -19,16 +19,14 @@ WORKDIR /app
RUN addgroup -g 1000 radicale \
&& adduser radicale --home /var/lib/radicale --system --uid 1000 --disabled-password -G radicale \
- && apk add --no-cache ca-certificates openssl
+ && apk add --no-cache ca-certificates openssl curl
COPY --chown=radicale:radicale --from=builder /app/venv /app
# Persistent storage for data
VOLUME /var/lib/radicale
-# TCP port of Radicale
-EXPOSE 5232
# Run Radicale
ENTRYPOINT [ "/app/bin/python", "/app/bin/radicale"]Note how this diff only contains 2 changes (no change in the CMD ["--hosts" ... line).
This is no difference in functionality, but the commit would appear more precise.
|
Here it is. I did not thought about the broad impact for existing deployments |