The official Hertz docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
Current Hertz docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
Hertz [həːts] is a high-usability, high-performance and high-extensibility Golang HTTP framework that helps developers build microservices.
hz is the official code generation tool for the Hertz HTTP framework. It parses IDL (Interface Definition Language) files — Thrift or Protobuf — and generates a complete, scaffolded Hertz project including handlers, routers, models, and client code.
Learn more on CloudWeGo.
The tag of each hertz docker image is consist of the version of hertz and the version of basic image. The details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| 0.10.6-oe2403sp4 | Hertz 0.10.6 on openEuler 24.03-LTS-SP4 | amd64, arm64 |
In this usage, users can select the corresponding {Tag} based on their requirements.
Pull the openeuler/hertz image from docker
docker pull openeuler/hertz:{Tag}
Check the installed hz version
docker run --rm openeuler/hertz:{Tag} hz --version
Generate a new Hertz project from a Thrift IDL
Place api.thrift in the current directory and run:
docker run --rm -v "$(pwd)":/workspace openeuler/hertz:{Tag} \
hz new --idl api.thrift --module github.com/example/myservice
The scaffolded project is written to the current directory.
Update an existing project after IDL changes
docker run --rm -v "$(pwd)":/workspace openeuler/hertz:{Tag} \
hz update --idl api.thrift
Generate model code only
docker run --rm -v "$(pwd)":/workspace openeuler/hertz:{Tag} \
hz model --idl api.thrift
Generate Hertz HTTP client code
docker run --rm -v "$(pwd)":/workspace openeuler/hertz:{Tag} \
hz client --idl api.thrift --base_domain localhost:8888
Start a long-running container for exploration
docker run -d --name my-hertz openeuler/hertz:{Tag} sleep infinity
View the container logs
docker logs -f my-hertz
To get an interactive shell
docker exec -it my-hertz bash
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.
Content type
Image
Digest
sha256:116219616…
Size
133.5 MB
Last updated
1 day ago
docker pull openeuler/hertz