Error building jenkins docker image

I am trying to create a docker jenkins image locally using a local jock docker file and I keep getting this error.

Step 17/34 : COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groovy
COPY failed: stat /var/lib/docker/tmp/docker-builder028619870/init.groovy: no such file or directory

Here is the Docker file that I am using. And this is the build command I'm using (Dockerfile is in PWD):

docker build -t jenkins-k8s .
+4
source share
1 answer

As you can see in this Github Repo, there is a file called init.groovy . And in the Docker file there is a statement like

COPY init.groovy /SOME/PATH/IN/THE/CONTAINER

If you want to use this Docker file, you also need to download init.groovy. But there are some more COPY statements in this Docker file.

I don’t know if you need such a large Docker file for your needs.

ParentImage DockerHub.

FROM jenkins/jenkins:2.73.3

USER root
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > 
/etc/timezone

USER jenkins

.

+1

Source: https://habr.com/ru/post/1691222/


All Articles