The current build repo is at:
https://github.com/elico/ifconfig.io
The binary and the actual container is separated into two separated processes.
In golang you can simple build for cross platforms and then just embed the binary inside an alpine container(it will not work with a scratch one).
To build and publish this project you will need to just run:
make
assuming you have docker installed and internet access.
After you will install the container you will be able to access:
http://172.17.0.1/
http://172.17.0.1/all.json
http://172.17.0.1/ip
http://172.17.0.1/html
and couple others which are available at https://ifconfig.io/
/
Code: Select all
interface/bridge/add name=dockers
/ip/address/add address=172.17.0.254/24 interface=dockers
/interface/veth/add name=veth1 address=172.17.0.1/24 gateway=172.17.0.254
/interface/bridge/port add bridge=dockers interface=veth1
#/container/stop [ find where tag=elicro/ifconfig.io:latest]
#/container/remove [ find where tag=elicro/ifconfig.io:latest]
/container config
set registry-url=https://registry-1.docker.io tmpdir=disk1/pull
/container envs
add key=PORT name=ifconfig value=80
add key=GIN_MODE name=ifconfig value=release
/container add dns=172.17.0.254 envlist=ifconfig interface=veth1 logging=yes root-dir=disk1/test remote-image=elicro/ifconfig.io:latest start-on-boot=yes
#/container/start [ find where tag=elicro/ifconfig.io:latest]