How to copy file from host to container using Dockerfile

前端 未结 7 1200
Happy的楠姐
Happy的楠姐 2020-12-13 03:11

I have written a Dockerfile which looks like this

FROM ubuntu:12.04

RUN apt-get update
RUN apt-get install -y wget

Now I\'m having a file

相关标签:
7条回答
  • 2020-12-13 04:12

    I faced this issue, I was not able to copy zeppelin [1GB] directory into docker container and was getting issue

    COPY failed: stat /var/lib/docker/tmp/docker-builder977188321/zeppelin-0.7.2-bin-all: no such file or directory

    I am using docker Version: 17.09.0-ce and resolved the issue with the following steps.

    Step 1: copy zeppelin directory [which i want to copy into docker package]into directory contain "Dockfile"

    Step 2: edit Dockfile and add command [location where we want to copy] ADD ./zeppelin-0.7.2-bin-all /usr/local/

    Step 3: go to directory which contain DockFile and run command [alternatives also available] docker build

    Step 4: docker image created Successfully with logs

    Step 5/9 : ADD ./zeppelin-0.7.2-bin-all /usr/local/ ---> 3691c902d9fe

    Step 6/9 : WORKDIR $ZEPPELIN_HOME ---> 3adacfb024d8 .... Successfully built b67b9ea09f02

    0 讨论(0)
提交回复
热议问题