If you are using node version 14.9.0 or later as a base image when trying to build a docker image on CircleCI you may come across the following permissions error:
EPERM: operation not permitted, copyfile
Node's docker image is officially supported on Docker version 1.9.1. Support for older versions (down to 1.6) is provided on a best-effort basis. You can find more information on Supported Docker Versions here.
How to make sure you are using the desired Docker version:
When using `setup_remote_docker` key, if a docker engine version is not specified, CircleCI will default to Docker version 17.09.0-ce. To specify the Docker version, you can set it with a
You can find more information on Building Docker Images on CircleCI in our docs.