'Docker doesn't get root permissions

I know that there are a lot of questions like this, but I think they are not my case.

So, even yesterday I entered docker-compose command like:

docker-compose up --build db

And it was working successfully. Dockerfile for this 'db' container is below:

FROM mcr.microsoft.com/mssql/server:2017-latest

WORKDIR /opt/mssql/bin

COPY ./ ./

RUN chmod +x ./*.sh &&\
    ./installation.sh

ENTRYPOINT ["./dump_import.sh"]

CMD ["tail -f /dev/null"]

But today after entering docker-compose up command I get error message while building:

chmod: changing permissions of '/opt/mssql/bin/checkinstallextensibility.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/compress-dump.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/crash-support-functions.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/entrypoint.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/generate-sql-dump.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/handle-crash.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/permissions_check.sh': Operation not permitted
chmod: changing permissions of '/opt/mssql/bin/test_db_readiness.sh': Operation not permitted

So, my question is -- what happened with docker last night or what should I do to build this image?

My colleagues successfully continue to use this image and I don't want to change it. I want to change something on my local machine (maybe something like config of Docker).

UPD:

I've tried to add this lines with user in docker-compose.yml:

...
services:
    datapower:
        build: .
        user: root
...

But I got same errors.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source