When executing the dockerfile, the command RUN cp -rf roundcubemail-1.2.3/. /var/www/html/
is executed and I'm getting the following error:
cp: cannot create directory '/var/www/html/': No such file or directory
ERROR: Service 'mailserver' failed to build: The command '/bin/sh -c cp -rf
roundcubemail-1.2.3/. /var/www/html/' returned a non-zero code: 1
That error occurs when executing any command on that directory. I already changed the permissions to 775, but that didn't change anything.
When adding 775 to RUN cp 775 -rf roundcubemail-1.2.3/. /var/www/html/
the error changes to "is not a directory".
/var/www/html
exists and is a directory? – Chris Davies Apr 09 '19 at 13:55sh -c
, which means the command possibly has to be quoted. – Kusalananda Apr 09 '19 at 13:56cp
will report that error if the/var/www
does not exist – Jeff Schaller Apr 09 '19 at 13:58cp
command, just/var/www
needs to exist (as a directory). It'll createhtml
if necessary, but not complain if it already exists. – Chris Davies Apr 09 '19 at 14:02