superset icon indicating copy to clipboard operation
superset copied to clipboard

docker COPY command in Dockerfile not documented

Open anddyhuaa opened this issue 7 years ago • 4 comments

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

anddyhuaa avatar Dec 05 '18 02:12 anddyhuaa

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

anddyhuaa avatar Dec 15 '18 10:12 anddyhuaa

Expected error, you are running the old docker 1.13 engine. chown flag for COPY was introduced in docker CE/EE 17.09.

kakoni avatar Feb 05 '19 13:02 kakoni

thanks

anddyhuaa avatar Feb 26 '19 02:02 anddyhuaa

same promble, it`s work. Thanks @anddyhuaa.

hanyan007 avatar Apr 19 '19 10:04 hanyan007