Annotations option added to hostconfig by emirhandurmus ยท Pull Request #2422 ยท docker-java/docker-java
Repository navigation
Annotations option added to hostconfig - #2422
Merged
eddumelendez merged 4 commits into docker-java:main from Datasance:main Jul 4, 2025
Merged
Annotations option added to hostconfig #2422 eddumelendez merged 4 commits into docker-java:main from Datasance:main
Conversation
emirhandurmus commented Apr 5, 2025
Copy link Copy Markdown
Contributor
Annotations opptions added to Hostconfig.
When users choose crun rather than runc and would like to deploy wasm containers, they need to provide annotations on hostconfig.
annotations option added to hostconfig
0853974
emirhandurmus
requested a review
from a team
as a code owner
April 5, 2025 12:38
eddumelendez commented May 13, 2025
Copy link Copy Markdown
Member
|
Hi, thanks for your contribution. Can you add a test, please? |
test case added for annotations
9e5e540
emirhandurmus commented May 13, 2025 · edited Loading
Copy link Copy Markdown
Contributor
Author
|
@eddumelendez test is added |
eddumelendez commented May 13, 2025
Copy link Copy Markdown
Member
|
thanks! test is failing |
emirhandurmus commented May 14, 2025 · edited Loading
Copy link Copy Markdown
Contributor
Author
|
@eddumelendez trying to figure out why it fails. It seems to be that annotations is properly added to hostconfig, and while creating container debug logs shows annotations are added to hosthostconfig. 12:32:39.416 DEBUG c.g.d.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.command.CreateContainerCmdImpl@113dcaf8[aliases=,argsEscaped=,attachStderr=,attachStdin=,attachStdout=,authConfig=AuthConfig(username=githubactions, email=null, registryAddress=https://index.docker.io/v1/, stackOrchestrator=null),cmd={sleep,9999},domainName=,entrypoint=,env=,exposedPorts=ExposedPorts(exposedPorts=[]),healthcheck=,hostConfig=HostConfig(binds=[], blkioWeight=null, blkioWeightDevice=null, blkioDeviceReadBps=null, blkioDeviceWriteBps=null, blkioDeviceReadIOps=null, blkioDeviceWriteIOps=null, memorySwappiness=null, nanoCPUs=null, annotations={com.example.key2=value2, com.example.key1=value1} , capAdd=null, capDrop=null, containerIDFile=null, cpuPeriod=null, cpuRealtimePeriod=null, cpuRealtimeRuntime=null, cpuShares=null, cpuQuota=null, cpusetCpus=null, cpusetMems=null, devices=null, deviceCgroupRules=null, deviceRequests=null, diskQuota=null, dns=null, dnsOptions=null, dnsSearch=null, extraHosts=null, groupAdd=null, ipcMode=null, cgroup=null, links=[], logConfig=LogConfig(type=null, config=null), lxcConf=null, memory=null, memorySwap=null, memoryReservation=null, kernelMemory=null, networkMode=null, oomKillDisable=null, init=null, autoRemove=null, oomScoreAdj=null, portBindings=null, privileged=null, publishAllPorts=null, readonlyRootfs=null, restartPolicy=null, ulimits=null, cpuCount=null, cpuPercent=null, ioMaximumIOps=null, ioMaximumBandwidth=null, volumesFrom=null, mounts=null, pidMode=null, isolation=null, securityOpts=null, storageOpt=null, cgroupParent=null, volumeDriver=null, shmSize=null, pidsLimit=null, runtime=null, tmpFs=null, utSMode=null, usernsMode=null, sysctls=null, consoleSize=null, cgroupnsMode=null),hostName=,image=busybox:latest,ipv4Address=,ipv6Address=,labels=,macAddress=,name=,networkDisabled=,networkingConfig=,onBuild=,platform=,portSpecs=,shell=,stdInOnce=,stdinOpen=,stopSignal=,stopTimeout=,tty=,user=,volumes=Volumes(volumes=[]),workingDir=] but container is not created with annotations on the host config therefore inspect response return annotations as null: 14:24:00.202 INFO c.g.d.cmd.CreateContainerCmdIT - Container inspection response: InspectContainerResponse(args=[9999], config=ContainerConfig(attachStderr=false, attachStdin=false, attachStdout=false, cmd=[sleep, 9999], domainName=, entrypoint=null, env=[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin], exposedPorts=null, hostName=8ace52143836, image=busybox:latest, labels={}, macAddress=null, networkDisabled=null, onBuild=null, stdinOpen=false, portSpecs=null, stdInOnce=false, tty=false, user=, volumes=null, workingDir=, healthCheck=null), created=2025-05-13T14:24:00.187078736Z, driver=overlay2, execDriver=null, hostConfig=HostConfig(binds=[], blkioWeight=0, blkioWeightDevice=null, blkioDeviceReadBps=null, blkioDeviceWriteBps=null, blkioDeviceReadIOps=null, blkioDeviceWriteIOps=null, memorySwappiness=null, nanoCPUs=0, annotations=nul l, capAdd=null, capDrop=null, containerIDFile=, cpuPeriod=0, cpuRealtimePeriod=0, cpuRealtimeRuntime=0, cpuShares=0, cpuQuota=0, cpusetCpus=, cpusetMems=, dev |
eddumelendez commented May 14, 2025
Copy link Copy Markdown
Member
|
looks like annotations are set building images not containers. See https://docs.docker.com/build/metadata/annotations/ So, I think we can close this one |
emirhandurmus commented May 14, 2025
Copy link Copy Markdown
Contributor
Author
|
nope annotation are also added to hostconfig since api version 1.43. curl -X POST curl -X GET |
createContainerWithAnnotations fixed with forcing to use proper api v...
fc4b136
...ersion
Merge branch 'main' into main
dc4f777
emirhandurmus commented Jul 3, 2025
Copy link Copy Markdown
Contributor
Author
|
@eddumelendez I just realized that the reason test was failed is due to default client for test use older api version. I fixed the test case. here is my local test results. |
9ccbd8f
into
docker-java : main
Jul 4, 2025
eddumelendez commented Jul 4, 2025
Copy link Copy Markdown
Member
|
Thanks for you contribution, @emirhandurmus ! |
This PR contains the following updates:
4af2766
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.github.docker-java:docker-java-transport-httpclient5](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java-transport](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java-core](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java-api](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | --- ### Release Notes <details> <summary>docker-java/docker-java (com.github.docker-java:docker-java-transport-httpclient5)</summary> ### [`v3.5.3`](https://github.com/docker-java/docker-java/releases/tag/3.5.3) [Compare Source](docker-java/docker-java@3.5.2...3.5.3) ##### Changes - Bump jackson.version from 2.18.3 to 2.18.4 [@​dependabot](https://github.com/dependabot) ([#​2473](docker-java/docker-java#2473)) - Drop jackson-jaxrs-json-provider dependency [@​eddumelendez](https://github.com/eddumelendez) ([#​2468](docker-java/docker-java#2468)) - Bump org.testcontainers:testcontainers from 1.21.2 to 1.21.3 [@​dependabot](https://github.com/dependabot) ([#​2467](docker-java/docker-java#2467)) - Bump commons-io:commons-io from 2.18.0 to 2.19.0 [@​dependabot](https://github.com/dependabot) ([#​2428](docker-java/docker-java#2428)) - Bump netty.version from 4.1.119.Final to 4.2.2.Final [@​dependabot](https://github.com/dependabot) ([#​2454](docker-java/docker-java#2454)) - Bump org.apache.httpcomponents.client5:httpclient5 from 5.4.4 to 5.5 [@​dependabot](https://github.com/dependabot) ([#​2445](docker-java/docker-java#2445)) ##### ๐ Enhancements - Annotations option added to hostconfig [@​emirhandurmus](https://github.com/emirhandurmus) ([#​2422](docker-java/docker-java#2422)) </details> --- ### Configuration ๐ **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). ๐ฆ **Automerge**: Enabled. โป **Rebasing**: Never, or you tick the rebase/retry checkbox. ๐ **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: a6ed07fba1bfcc1f48eed708427db745d4823318eddumelendez modified the milestones: 3.7.1 , 3.5.3 Mar 25, 2026 eizus pushed a commit to cdrxyz/misk that referenced this pull request Jul 18, 2026
This PR contains the following updates:
48c522e
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.github.docker-java:docker-java-transport-httpclient5](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java-transport](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java-core](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java-api](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | | [com.github.docker-java:docker-java](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.5.2` -> `3.5.3` | --- ### Release Notes <details> <summary>docker-java/docker-java (com.github.docker-java:docker-java-transport-httpclient5)</summary> ### [`v3.5.3`](https://github.com/docker-java/docker-java/releases/tag/3.5.3) [Compare Source](docker-java/docker-java@3.5.2...3.5.3) ##### Changes - Bump jackson.version from 2.18.3 to 2.18.4 [@​dependabot](https://github.com/dependabot) ([#​2473](docker-java/docker-java#2473)) - Drop jackson-jaxrs-json-provider dependency [@​eddumelendez](https://github.com/eddumelendez) ([#​2468](docker-java/docker-java#2468)) - Bump org.testcontainers:testcontainers from 1.21.2 to 1.21.3 [@​dependabot](https://github.com/dependabot) ([#​2467](docker-java/docker-java#2467)) - Bump commons-io:commons-io from 2.18.0 to 2.19.0 [@​dependabot](https://github.com/dependabot) ([#​2428](docker-java/docker-java#2428)) - Bump netty.version from 4.1.119.Final to 4.2.2.Final [@​dependabot](https://github.com/dependabot) ([#​2454](docker-java/docker-java#2454)) - Bump org.apache.httpcomponents.client5:httpclient5 from 5.4.4 to 5.5 [@​dependabot](https://github.com/dependabot) ([#​2445](docker-java/docker-java#2445)) ##### ๐ Enhancements - Annotations option added to hostconfig [@​emirhandurmus](https://github.com/emirhandurmus) ([#​2422](docker-java/docker-java#2422)) </details> --- ### Configuration ๐ **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). ๐ฆ **Automerge**: Enabled. โป **Rebasing**: Never, or you tick the rebase/retry checkbox. ๐ **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: a6ed07fba1bfcc1f48eed708427db745d4823318Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment