dockerfile_of_hello-world

module
v0.0.0-...-eb8c231 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: MIT

README

hello-world API

Simple Web API container that just returns "hello-world" on HTTP request.

  • Listen Port: 8080

Local Usage

build
docker build -t hello-world . && docker image prune -f

For ARM32v6 architecture. (RaspberryPi Zero)

docker build -f ./Dockerfile.arm32v6 -t hello-world . && docker image prune -f
Run
docker run --rm -d -p 8888:8080 --name hello hello-world
Action
curl http://localhost:8888/

Troubleshoot

port is already allocated error

If you get the below error on docker run, change the port to another such like -p 8889:8080. The port 8888 is already in use.

docker: Error response from daemon: driver failed programming external connectivity on endpoint hello (...): Bind for 0.0.0.0:8888 failed: port is already allocated.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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