Issues faced in Docker

Not able to change the user and group for the files copied in Dockerfile using COPY command

Info: By default, COPY command will copy the file to user and group as root

RUN chmod +x
[91mchmod: changing permissions of '': Operation not permitted
[0mThe command '/bin/sh -c chmod +x' returned a non-zero code: 1
make: *** [build] Error 1

Solution: While copying the files using COPY command chnage the user and group using additional parameters

COPY --chown=ubuntu:ubuntu ./ .