AliveImage

command module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 7 Imported by: 0

README

Alive Image

A simple docker image based on go and docker that serves a json response with the uptime of the container.

Made using go and docker.

Environment Variables

  • PORT: The port to serve the response. Default: 80

Usage

docker run -d -p 80:80 -e PORT=80 --name aliveImage divideprojects/aliveimage

Build and Run

Build:

docker build -t aliveimage-local .

Run:

docker run -d -p 80:80 -e PORT=80 --name aliveImage aliveimage-local

Test

curl localhost

By default, the image will serve a json response with the following content: {"status": "alive", "uptime": "1m 0s"}

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