Sometimes when building an actor using a custom Dockerfile, you might receive errors like:
Missing write access to ...
EACCES: permission denied
This problem is usually caused by the fact that by default, the
COPY Dockerfile instruction copies files as the root user (with UID and GID of 0), while your Dockerfile probably uses another user to copy files and run commands.
To fix this problem, make sure the
COPY instruction in Dockerfile uses the
--chown flag. For example, instead of
COPY . ./
COPY --chown=myuser:myuser . ./
myuser is the user and group defined by the
USER instruction in the base Docker image. To learn more, see Dockerfile documentation.
Hope this helps!