Early in this book, we explained how to containerize applications through Dockerfile development. This involved the docker build utility, which creates a ready-to-use container image by following Dockerfile instructions.
Generally speaking, OpenShift supports existing application Dockerfiles, but it has special default security-related requirements that require you to modify/adjust application Dockerfiles to be aligned with OpenShift security standards.
The default security policy runs any containers using a random User ID (UID) and ignores the USER Dockerfile instruction. The applications are always run under the root user group.
If the application needs read-write access, you need to configure RW access to the root group, which can usually be archived with the following Dockerfile snippet:
...
RUN chown -R 1001:0 /var/lib/myaplication /var...