Move VOLUME command after all the RUN commands to avoid the permissions changing on the VOLUME
We are still having issues with the /var/lib/mysql
directory being owned by root:root and causing the container to not startup.
I initially added the chown -R mysql:mysql /var/lib/mysql
and tested locally by building with docker build
; however, since the container has been built and pushed to the Iron Bank, the permissions issue still remains.
This GitHub issue describes a bug in buildah
that causes the VOLUME
permissions to be changed if a RUN
command is after it.
Will the build pipelines be affected by this bug? As a temporary workaround, I believe moving the VOLUME
command after all RUN
commands will work.