I cannot start Jenkins inside Docker using the official image.
Dockerfile:
FROM jenkins/jenkins:lts
COPY resources/init.groovy.d/executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy
COPY resources/jenkins-as-code-config.yaml /var/jenkins/home/jenkins-as-code-config.yaml
COPY resources/plugins.list /usr/share/jenkins/ref/plugins.list
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.list
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
ENV CASC_JENKINS_CONFIG /var/jenkins/home/jenkins-as-code-config.yaml
I'm always getting this result (I'm using rundeck to control my raspi nodes hence the additional log output):
10:04:37 hal 1. Pull Jenkins Base Image hal | CHANGED | rc=0 >>
10:04:37 lts: Pulling from jenkins/jenkins
10:04:37 Digest: sha256:1433deaac433ce20c534d8b87fcd0af3f25260f375f4ee6bdb41d70e1769d9ce
10:04:37 Status: Image is up to date for jenkins/jenkins:lts
10:04:37 docker.io/jenkins/jenkins:lts
10:04:51 2. Run Start Script hal | CHANGED | rc=0 >>
10:04:51 [INFO] Change dir
10:04:51 [INFO] build docker image
10:04:51 Sending build context to Docker daemon 9.728kB
10:04:51
10:04:51 Step 1/7 : FROM jenkins/jenkins:lts
10:04:51 ---> 1920bf702d7d
10:04:51 Step 2/7 : COPY resources/init.groovy.d/executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy
10:04:51 ---> Using cache
10:04:51 ---> 3a49d6ea509e
10:04:51 Step 3/7 : COPY resources/jenkins-as-code-config.yaml /var/jenkins/home/jenkins-as-code-config.yaml
10:04:51 ---> Using cache
10:04:51 ---> b3c072b517f2
10:04:51 Step 4/7 : COPY resources/plugins.list /usr/share/jenkins/ref/plugins.list
10:04:51 ---> Using cache
10:04:51 ---> 7de88ffa119c
10:04:51 Step 5/7 : RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.list
10:04:51 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
10:04:51 ---> Running in 01df5b34c598
10:04:51 standard_init_linux.go:219: exec user process caused: exec format error
10:04:51 [DONE] Finished building docker image
10:04:51 [INFO] start rundeck container
10:04:51 [INFO] ------------------------------------------------------------------
10:04:51 [INFO] startup in progress (detached)
10:04:51 [INFO] ------------------------------------------------------------------The command '/bin/sh -c /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.list' returned a non-zero code: 1
10:04:51 Unable to find image 'jenkins-hal-image:latest' locally
10:04:51 docker: Error response from daemon: pull access denied for jenkins-hal-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
10:04:51 See 'docker run --help'.
10:04:55 3. Show Containers hal | CHANGED | rc=0 >>
10:04:55 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
10:04:55 5a6a2d6fde0d portainer/portainer:arm "/portainer" 11 hours ago Up 11 hours 0.0.0.0:9990->9000/tcp raspi-portainer
So my question is: Is there an image for ARM architecture I can use?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…