Docker not found when building docker image using Docker Jenkins container pipeline

后端 未结 5 1648
忘掉有多难
忘掉有多难 2020-11-29 07:39

I have a Jenkins running as a docker container, now I want to build a Docker image using pipeline, but Jenkins container always tells Docker not found.

[simp         


        
5条回答
  •  囚心锁ツ
    2020-11-29 08:05

    You're missing the docker client. Install it as this in Dockerfile:

    RUN curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.04.0-ce.tgz \
      && tar xzvf docker-17.04.0-ce.tgz \
      && mv docker/docker /usr/local/bin \
      && rm -r docker docker-17.04.0-ce.tgz
    

    Source

提交回复
热议问题