-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Initial commitment of documentation for clickhouse official image #2397
Conversation
The content.md + license.md are the same as docker/server/README.md in ClickHouse/ClickHouse#63400 |
Close/reopen to retrigger fresh GHA checks 👍 |
It looks like I missed some metadata.json there. I'll read what it is. |
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.
CI is complaining about metadata.json
, which is new since you opened this -- I think something like the following is probably the contents you'll want, but if you'd rather just leave that I'm happy to ignore the failing CI and take care of that myself out-of-band (your choice):
{
"hub": {
"categories": [
"databases-and-storage"
]
}
}
clickhouse/content.md
Outdated
### connect to it from a native client | ||
|
||
```bash | ||
docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client clickhouse/clickhouse-server --host clickhouse-server |
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.
I would not recommend adding new documentation referencing --link
(it is deprecated; see https://docs.docker.com/engine/network/links/ and #1441), but it's up to you -- the image reference needs to be correct though:
docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client clickhouse/clickhouse-server --host clickhouse-server | |
docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client %%IMAGE%% --host clickhouse-server |
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.
Getting rid of --link
would require some good replacement, and off the top of my head, the docker network juggling doesn't give an easy-to-use alternative.
Can you suggest something here?
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.
#1441 was the best I could come up with (without having a common blurb for every image trying to explain Docker Networks), but it's very "go read the manual" so I'm not super happy about it either (I really like the --link
feature, fwiw 😭)
If you'd rather keep --link
that is OK 👍
- The amd64 image requires support for [SSE3 instructions](https://en.wikipedia.org/wiki/SSE3). Virtually all x86 CPUs after 2005 support SSE3. | ||
- The arm64 image requires support for the [ARMv8.2-A architecture](https://en.wikipedia.org/wiki/AArch64#ARMv8.2-A) and additionally the Load-Acquire RCpc register. The register is optional in version ARMv8.2-A and mandatory in [ARMv8.3-A](https://en.wikipedia.org/wiki/AArch64#ARMv8.3-A). Supported in Graviton >=2, Azure and GCP instances. Examples for unsupported devices are Raspberry Pi 4 (ARMv8.0-A) and Jetson AGX Xavier/Orin (ARMv8.2-A). |
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.
As the author of opencontainers/image-spec@2d95dde, I love this -- I wish we had a way to specify that the amd64
image variant should be v2
(corresponding to the lowest level with SSE3) and the arm64
variant could be v8.2
, but we don't currently have a way to specify either in our system and the latter would break folks (until containerd/platforms#8 and similar trickle down to popular runtimes), so for now I'm just happy to see it documented explicitly (hopefully ClickHouse also reports a clear error when these are missing). 😄 ❤️
They are optional and can be enabled using the following [docker command-line arguments](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities): | ||
|
||
```bash | ||
docker run -d \ | ||
--cap-add=SYS_NICE --cap-add=NET_ADMIN --cap-add=IPC_LOCK \ |
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.
Given that they're optional, you don't happen to have any documentation about what each of these are used for and when/why users might want to set them (specific to ClickHouse behavior), do you?
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.
Hmm, is this URL worth adding here?
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.
The line is added below:
Read more in [knowledge base](https://clickhouse.com/docs/knowledgebase/configure_cap_ipc_lock_and_cap_sys_nice_in_docker).
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.
Yeah, for sure! I wonder if it could be improved to explain why, but that's not a blocker at all, just something I think would be useful. 😄 ❤️
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.
There's a part of the ClickHouse logs related to the capabilities on the KB page:
2023.04.19 08:04:10.022720 [ 1 ] {} <Information> Application: It looks like the process has no CAP_IPC_LOCK capability, binary mlock will be disabled. It could happen due to incorrect ClickHouse package installation. You could resolve the problem manually with 'sudo setcap cap_ipc_lock=+ep /usr/bin/clickhouse'. Note that it will not work on 'nosuid' mounted filesystems.
2023.04.19 08:04:10.065860 [ 1 ] {} <Information> Application: It looks like the process has no CAP_SYS_NICE capability, the setting 'os_thread_priority' will have no effect. It could happen due to incorrect ClickHouse package installation. You could resolve the problem manually with 'sudo setcap cap_sys_nice=+ep /usr/bin/clickhouse'. Note that it will not work on 'nosuid' mounted filesystems.
Should I add it as well explicitly?
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.
Naw, I think what you've got now is fine. 👍
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.
For the rest, I'll try to build a limited version of your update.sh
in our repo to have compatibility between repos. Will be back in a moment
They are optional and can be enabled using the following [docker command-line arguments](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities): | ||
|
||
```bash | ||
docker run -d \ | ||
--cap-add=SYS_NICE --cap-add=NET_ADMIN --cap-add=IPC_LOCK \ |
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.
Hmm, is this URL worth adding here?
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.
The --link
is only question, I think
clickhouse/content.md
Outdated
### connect to it from a native client | ||
|
||
```bash | ||
docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client clickhouse/clickhouse-server --host clickhouse-server |
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.
Getting rid of --link
would require some good replacement, and off the top of my head, the docker network juggling doesn't give an easy-to-use alternative.
Can you suggest something here?
They are optional and can be enabled using the following [docker command-line arguments](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities): | ||
|
||
```bash | ||
docker run -d \ | ||
--cap-add=SYS_NICE --cap-add=NET_ADMIN --cap-add=IPC_LOCK \ |
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.
The line is added below:
Read more in [knowledge base](https://clickhouse.com/docs/knowledgebase/configure_cap_ipc_lock_and_cap_sys_nice_in_docker).
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.
Only a couple really minor things 👀
clickhouse/github-repo
Outdated
@@ -0,0 +1 @@ | |||
https://github.com/ClickHouse/docker-library |
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.
Mostly an FYI, this will get used for things like links in the "Quick Reference" section to GitHub issues -- is this where you want users to file issues related to the image, or would you rather they go to ClickHouse/ClickHouse? (do you plan to keep issues enabled on the docker-library repository?)
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.
I misinterpret the readme, it should be the ClickHouse/ClickHouse
for sure
Oh, my chaos, my chaos, my chaos! Did we finish it? What's next? I am so excited ^_^ |
(as noted in docker-library/official-images#15846 (comment), just waiting for @yosifkit to give me another set of eyes 🤞) |
@tianon "funny" aftermath. I haven't found that the 24.10 is built on top of jammy, AKA 22.04, so the https://github.com/docker-library/docs/pull/2397/files#diff-6a2321fc3b812fb166b7184bef1475db0c18919ad2612b02e06429f4cc986fc4R17 is not valid. I'll fix it in the follow-up PR to the library, where I will make this version update: addressed the issue with 24.10's base in docker-library/official-images#17876 |
Hello, dear official library team. Here's our attempt to create an official image
clickhouse
in the scope of docker-library/official-images#14136 and ClickHouse/ClickHouse#31473Both the docs and official images PRs are created simultaneously.
docker-library/official-images#15846