sh: 1: cannot create /home/jenkins/agent/workspace/myproject/durable-48fa5881/jenkins-log.txt: Permission denied
So after reading a thread on Jenkins blog; I realized that "Jenkins" user is being used by Jenkins, and I was using "myuser" in my pod. So, I changed everything in my Dockerfile to match Jenkins slave image, like the following:
RUN groupadd --gid 10000 jenkins && useradd --gid 10000 --uid 10000 jenkins --shell /bin/bash
RUN mkdir /home/jenkins && chown -R jenkins:jenkins /home/jenkins
USER jenkins
WORKDIR /home/jenkins
After that, the permission denied error went away. I am still wondering how this was working before...