An open API service indexing awesome lists of open source software.

https://github.com/guillembonet/public-ip-server

Small docker container which allows getting the public IP of the container via HTTP request secured by a static password.
https://github.com/guillembonet/public-ip-server

chatgpt docker go golang http http-server public-ip public-ip-address

Last synced: about 1 month ago
JSON representation

Small docker container which allows getting the public IP of the container via HTTP request secured by a static password.

Awesome Lists containing this project

README

          

# public-ip-server

[![Docker Version](https://img.shields.io/docker/v/bunetz/public-ip-server?sort=date)](https://hub.docker.com/r/bunetz/public-ip-server)
[![Docker Pulls](https://img.shields.io/docker/pulls/bunetz/public-ip-server)](https://hub.docker.com/r/bunetz/public-ip-server)

### **This code has been almost fully generated by Chat GPT ([conversation here](https://sharegpt.com/c/59D737L)).**
## Description
Small docker container which allows getting the public IP of the container via HTTP request secured by a static password.

## Usage
Just run the container and optionally specify flags:
```
-cacheDuration duration
duration of the cache response (default 20m0s)
-httpClientTimeout duration
timeout for the http client which calls the external API (default 10s)
-listenAddr string
address to listen (for example: :8080 or 0.0.0.0:80 (default ":8080")
-password string
password which will be required by Authorization header (default "password")
```

Get the container's public IP with:

`curl -H "Authorization: " http://localhost:8080`