Skip to content

Dirc/hostname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang webapp - hostname

A simple webapp that prints the hostname

Run

# Kubernetes
kubectl create deployment web --image=dirc/hostname --replicas=3
kubectl expose deployment web --port 8080
kubectl port-forward svc/web 8080

# Docker
docker run -d --rm -p 8080:8080 dirc/hostname:1.0

# Verify
curl http://localhost:8080

Docker

TAG=1.2
IMAGE=dirc/hostname

docker build -t ${IMAGE}:$TAG .
docker build -t ${IMAGE}:latest .

docker run -d --rm -p 8080:8080 ${IMAGE}:$TAG

docker push ${IMAGE}:$TAG
docker push ${IMAGE}:latest

webapp

Run go webapp

go run app.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published