Skip to content

Simple HTTP application for demos and tests

License

Notifications You must be signed in to change notification settings

Qxe8/ifconfig.me

Repository files navigation

go version of ifconfig.me

Publish Container image to DockerHubCodeship Status for pmarques/ifconfig.meBuild StatusCircleCIBuild StatusDocker Build Status

This was my first project using go, a simple HTTP server that returns your public IP address. I'm using this project for demos and learning about Docker, Go and experiment some workflows.

Requirements

  • GO >=1.9 (otherwise the steps in this readme will not work)

Development

Run

go run app/main.go 

Test

go test ./... 

Create binary

Build / Compile

go build -o ifconfig.me app/main.go 

Run

./ifconfig.me 

Docker

  • Build
docker build -t ifconfig.me .
  • Run
docker run -p 8080:80 ifconfig.me

Kubernetes

kubectl apply -f k8s-test.yaml 

Debug container

Since there is no OS or utils in the container we need to use Ephemeral Containers although it's currenlty in alpha. For more info check https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/

kubectl debug -it ifconfig.me --image=busybox --target=ifconfig.me-9bf8x 

References

About

Simple HTTP application for demos and tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go95.7%
  • Dockerfile4.3%