I am deploying my application in a kubernetes pod which is read-only in the cluster. Also, in entrypoint.sh I am starting apache2 server using
apachectl -D FOREGROUND
This is trying to create some folder in the read only pod resulting in this error:
mktemp: failed to create directory via template '/var/lock/apache2.XXXXXXXXXX': Read-only file system
chmod: missing operand after '755'
How can I avoid this. Please note that I have tried to create this tmp file at the docker image creation time and applied that image and it is still giving same error.