Sign inSign up

dockerfornovices/api-server

By dockerfornovices

Updated almost 3 years ago

Demo image for workshop -- serves API calls on 8000

Image
0

1.1K

dockerfornovices/api-server repository overview

Simple example of a Docker server application

Build a Go API server in a Docker container

Go API code is from https://github.com/HakaseLabs/source-blog/blob/master/rest-api/main.go

From the this directory build with docker image build -t api-server .

Run with docker container run -p 8089:8000 --rm -d api-server:latest

Test with curl -v http://0.0.0.0:9089/people

Get Health check status with docker container inspect --format '{{.State.Health.Status}}' <ID>", or docker container inspect --format '{{json .State.Health.Status}}'|jq if jq is installed

Tag summary

Content type

Image

Digest

sha256:1c7560dee

Size

9.2 MB

Last updated

almost 3 years ago

docker pull dockerfornovices/api-server