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.
- Host: GitHub
- URL: https://github.com/guillembonet/public-ip-server
- Owner: Guillembonet
- Created: 2023-01-26T09:41:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-26T09:54:14.000Z (over 3 years ago)
- Last Synced: 2025-07-03T09:11:22.334Z (11 months ago)
- Topics: chatgpt, docker, go, golang, http, http-server, public-ip, public-ip-address
- Language: Go
- Homepage: https://hub.docker.com/r/bunetz/public-ip-server
- Size: 3.55 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# public-ip-server
[](https://hub.docker.com/r/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`