Move an image between hosts
Fix network not found on docker compose up
If the network changes and you try to start a container, the container fails with a message similar to the following:
ERROR: for SERVICE Cannot start service SERVICE: Could not attach to network xq8k2g3yn3g15d1tonbmas6b4: rpc error: code = NotFound desc = network xq8k2g3yn3g15d1tonbmas6b4 not found
ERROR: for SERVICE Cannot start service SERVICE: network eqm5t4dml9e05oqyb80lw7b7g not found
Docker compose up will create the network but the new network will have another ID and docker compose will not edit the container to use the new network. So after a docker-compose up -d
you have to connect the network to the container.
So first, we make sure it was created.
And add it to the container.