A floating IP or also called FIP, is a public accessible IP address that can be attached to one container. A Floating IP can also be remapped to other containers in the same region, and can be used this way to switch between different deployments.
You need to allocate new free IPs before assigning them to containers:
$ hyper fip allocate 1 Please note that Floating IP (FIP) is billed monthly ($1). The billing begins when a new IP is allocated, ends when it is released. Partial month is treated as a entire month. Do you want to continue? [y/n]: y 126.96.36.199 $ hyper fip attach 188.8.131.52 myweb myweb
To detach a floating IP from a container:
$ hyper fip detach web 184.108.40.206
If you want to move the floating ip from one container to another, you must first detach it from the old container and then attach it again like this:
$ hyper fip detach myweb && hyper fip attach 220.127.116.11 myweb2
Deleting Floating IP
rm a container, the floating IP will be automatically detached.
You can also release the ip if there is no container attached:
$ hyper fip release 18.104.22.168 22.214.171.124
NOTE: floating IP is priced at a monthly rate. When an IP is allocated, you will be charged for that current month.
Stop and restart containers
When a container is stopped or restarted, the floating IP (if any) is still attached with the container, which means that when you (re)start the container, you don't need to attach the floating IP again.
$ hyper stop myweb myweb $ hyper ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES PUBLIC IP 3259d441edae ghost "/entrypoint.sh npm s" 16 minutes ago Exited (0) 4 seconds ago myweb 126.96.36.199 $ hyper start myweb myweb $ hyper ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES PUBLIC IP 3259d441edae ghost "/entrypoint.sh npm s" 17 minutes ago Up 4 seconds 0.0.0.0:2368->2368/tcp myweb 188.8.131.52