see this:
USER superset
...
COPY --chown=superset:superset superset superset
seemd not in docker's documentation
ERROR: Unknown flag: chown
so I confused why using this and USER superset actually doesn't have the privilege to do this
[root@docker01 ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-84.git07f3374.el7.centos.x86_64
Go version: go1.10.2
Git commit: 07f3374/1.13.1
Built: Fri Nov 30 02:48:45 2018
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-84.git07f3374.el7.centos.x86_64
Go version: go1.10.2
Git commit: 07f3374/1.13.1
Built: Fri Nov 30 02:48:45 2018
OS/Arch: linux
i'v modified the Dockerfile as follows:
...
WORKDIR /home/superset
COPY requirements.txt .
COPY requirements-dev.txt .
RUN pip install --upgrade setuptools pip
&& pip install -r requirements.txt -r requirements-dev.txt
&& rm -rf /root/.cache/pip
COPY superset superset
RUN chown -R superset:superset /home/superset/superset
USER superset
ENV PATH=/home/superset/superset/bin:$PATH
...
Expected error, you are running the old docker 1.13 engine. chown flag for COPY was introduced in docker CE/EE 17.09.
thanks
same promble, it`s work. Thanks @anddyhuaa.
Most helpful comment
i'v modified the Dockerfile as follows:
...
WORKDIR /home/superset
COPY requirements.txt .
COPY requirements-dev.txt .
RUN pip install --upgrade setuptools pip
&& pip install -r requirements.txt -r requirements-dev.txt
&& rm -rf /root/.cache/pip
COPY superset superset
RUN chown -R superset:superset /home/superset/superset
COPY --chown=superset:superset superset superset
USER superset
ENV PATH=/home/superset/superset/bin:$PATH
...