Incubator-superset: docker COPY command in Dockerfile not documented

Created on 5 Dec 2018  Â·  4Comments  Â·  Source: apache/incubator-superset

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

.docker answered

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
...

All 4 comments

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
...

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lenguyenthedat picture lenguyenthedat  Â·  3Comments

john-bodley picture john-bodley  Â·  3Comments

kalimuthu123 picture kalimuthu123  Â·  3Comments

eliab picture eliab  Â·  3Comments

shyam2794 picture shyam2794  Â·  3Comments