Bump on openziti docker images please

Hey @gooseleggs I just updated the docker image, there are now two locations for ziti “stuff”. One is /var/openziti/ which will house the scripts and binaries, the other is /persistent/ which will house all the rest (configs, env files, pki, etc) which is the new shared volume replacing /openziti/. This way when a new image is pulled, the scripts and binaries will be replaced but the network configs and such will remain as they are now the shared volume.

MIGRATION STEPS

Backup current files:
Back up your current files in the /openziti/ folder in the container. You can do this fairly easily with docker cp <container_name>:/openziti <local_path>. For example, I used docker cp docker_ziti-controller_1:/openziti . which just copied the openziti folder to my current path.

Add persistent volume
Add the following under the volumes section of ziti-controller in docker-compose, this would be the current docker-compose you are using, not the latest one. This will essentially copy all the files in /openziti to the /persistent directory.

ziti-fs:/persistent

As an example, the volumes in ziti-controller should look like this in your docker-compose file

    volumes:
      - ziti-fs:/openziti
      - ziti-fs:/persistent

Update path references

  1. Start up your environment docker-compose up -d

  2. Exec into controller and change paths docker exec -u 0 -it docker_ziti-controller_1 /bin/bash Note that your controller container name may be slightly different.

  3. Update paths in the following order, you can just copy and paste the whole block.

    sed -i -e 's#/openziti/ziti-bin#/var/openziti/ziti-bin#g' $(find . -maxdepth 1 -type f)
    sed -i -e 's#/openziti/scripts#/var/openziti/scripts#g' $(find . -maxdepth 1 -type f)
    sed -i -e 's#/openziti/pki#/persistent/pki#g' $(find . -maxdepth 1 -type f)
    sed -i -e 's#/openziti#/persistent#g' $(find . -maxdepth 1 -type f)
    sed -i -e 's#var/persistent#var/openziti#g' $(find . -maxdepth 1 -type f)
    
  4. Shut down the environment (keeping the volume so no -v) docker-compose down

Get the latest docker-compose
I’m not sure if you’re using the repo or you just have a copied version of the file. So, git pull if you’re using the repo or, you can find the file here ziti/docker-compose.yml at release-next · openziti/ziti · GitHub

Update local image
Run docker-compose pull to pull the latest quickstart image

Start up as usual
At this point you can start your environment as normal docker-compose up -d

Note: If you run into any issues along the way, you should have your backup files that were copied during the first step but of course, let me know if I can help.