docker-hello-world

command module
v0.0.0-...-d66f23d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GHCR Build Status Docker Hub Build Status

ghcr.io/infrastructure-as-code/hello-world

A Prometheus-instrumented Docker "Hello World" web server. This image began life as infrastructureascode/hello-world on Docker Hub, and is now also available on the GitHub Container Registry as ghcr.io/infrastructure-as-code/hello-world.

Images

Registry Name Image Name
GitHub Container Registry ghcr.io/infrastructure-as-code/hello-world
Docker Hub infrastructureascode/hello-world

Features

  1. Always returns a HTTP 200 status code and a "Hello, World!" message at the / path.
  2. Has a metrics endpoint at /metrics that returns Prometheus metrics.
  3. Has a health check endpoint, /health, that returns an empty response and a HTTP 200 response.

Building

docker build --rm -t ghcr.io/infrastructure-as-code/hello-world .

Releases

Images are built with GitHub Actions upon tagging/push, and pushed directly to the GitHub Container Registry. You can look at the packages page for the latest tagged version.

Additionally, the sha1sum of the binary in each image is emitted during the build process (look for "Show binary info") in the build logs in case provenance is a concern.

Usage

# start the container
docker run \
  --detach \
  --name hello-world \
  --publish 8000:8080 \
  ghcr.io/infrastructure-as-code/hello-world

# curl the container
curl http://0.0.0.0:8000/

# curl the health check endpoint which returns an empty response
curl http://0.0.0.0:8000/health

# curl Prometheus metrics
curl http://0.0.0.0:8000/metrics

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址