So this has been bugging me, and I have been scripting my way around it... so maybe I need to be pointed in the right direction or to be slapped on the hand to stop deleting the file. The init container has to run, otherwise the controller container crashes. But once it's init'd, why is it still needed at every startup? That's not very 'init' of it. It's a conundrum, 'init?
$****************************************************************
docker-compose init file has been detected, the initialization
of the docker-compose environment has already happened. If you
wish to allow this volume to be re-initialized, delete the file
located at /persistent/access-control.init
*****************************************************************
I forgot to include what I am using.
FROM alpine:latest
RUN mkdir /persistent
CMD ["rm", "-rf", "/persistent/access-control.init"]
and this is the addition to the compose file.
rm-init:
image: rm-init
volumes:
- ./ziti-fs:/persistent
and I add these lines to the controller container
depends_on:
- rm-init