인프런 커뮤니티 질문&답변

estar987님의 프로필 이미지

작성한 질문수

그림으로 배우는 쿠버네티스(v1.30) - {{ x86-64, arm64 }}

Jenkins 빌드 중 발생한 오류

작성

·

843

·

수정됨

0

교재로 공부를 진행하던 중 젠킨스 빌드가 안되는 오류가 발생하였는데 뭐가 문제인가요?
도커가 없다는 오류 같아서 확인해보니 도커는 있습니다.

교재 p344 페이지입니다.

Started by user admin
Running as SYSTEM
Agent default-qb8pr is provisioned from template default
---
apiVersion: "v1"
kind: "Pod"
metadata:
  labels:
    jenkins/label-digest: "6ba93233d22ff0212c5c877dbc5afb06b7d3aafc"
    jenkins/jenkins-jenkins-slave: "true"
    jenkins/label: "jenkins-jenkins-slavex"
  name: "default-qb8pr"
spec:
  containers:
  - args:
    - "********"
    - "default-qb8pr"
    env:
    - name: "JENKINS_SECRET"
      value: "********"
    - name: "JENKINS_TUNNEL"
      value: "jenkins-agent:50000"
    - name: "JENKINS_AGENT_NAME"
      value: "default-qb8pr"
    - name: "JENKINS_NAME"
      value: "default-qb8pr"
    - name: "JENKINS_AGENT_WORKDIR"
      value: "/home/jenkins"
    - name: "JENKINS_URL"
      value: "http://192.168.1.11"
    image: "jenkins/inbound-agent:4.3-4"
    imagePullPolicy: "IfNotPresent"
    name: "jnlp"
    resources:
      limits:
        memory: "512Mi"
        cpu: "512m"
      requests:
        memory: "512Mi"
        cpu: "512m"
    tty: false
    volumeMounts:
    - mountPath: "/usr/bin/kubectl"
      name: "volume-0"
      readOnly: false
    - mountPath: "/bin/docker"
      name: "volume-1"
      readOnly: false
    - mountPath: "/var/run/docker.sock"
      name: "volume-2"
      readOnly: false
    - mountPath: "/home/jenkins"
      name: "workspace-volume"
      readOnly: false
    workingDir: "/home/jenkins"
  hostNetwork: false
  nodeSelector:
    kubernetes.io/os: "linux"
  restartPolicy: "Never"
  securityContext:
    runAsGroup: 993
    runAsUser: 1000
  serviceAccount: "jenkins"
  volumes:
  - hostPath:
      path: "/usr/bin/kubectl"
    name: "volume-0"
  - hostPath:
      path: "/var/run/docker.sock"
    name: "volume-2"
  - hostPath:
      path: "/bin/docker"
    name: "volume-1"
  - emptyDir:
      medium: ""
    name: "workspace-volume"

Building remotely on default-qb8pr (jenkins-jenkins-slave) in workspace /home/jenkins/workspace/dpy-fs-dir-prod
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/iac-source/echo-ip
 > git init /home/jenkins/workspace/dpy-fs-dir-prod # timeout=10
Fetching upstream changes from https://github.com/iac-source/echo-ip
 > git --version # timeout=10
 > git --version # 'git version 2.20.1'
 > git fetch --tags --force --progress -- https://github.com/iac-source/echo-ip +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/iac-source/echo-ip # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
 > git rev-parse refs/remotes/origin/main^{commit} # timeout=10
Checking out Revision 5ed2bf9132d6fabf9481ea8f90b1bdddd74490fe (refs/remotes/origin/main)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 5ed2bf9132d6fabf9481ea8f90b1bdddd74490fe # timeout=10
Commit message: "Update README.md"
First time build. Skipping changelog.
[dpy-fs-dir-prod] $ /bin/sh -xe /tmp/jenkins2525911456150578809.sh
+ docker build -t 192.168.1.10:8443/echo-ip .
/bin/docker: 2: .: Can't open /etc/sysconfig/docker
Build step 'Execute shell' marked build as failure
Finished: FAILURE


답변 2

0

/bin/docker: 2: .: Can't open /etc/sysconfig/docker

 

Jenkins 관리 -> 노드관리 -> Configure Clouds

Pod Templates -> Pod Template details ->

image

save 하시고 빌드 하시면 정상적으로 됩니다.

 

 

 

 

0

조훈(Hoon Jo)님의 프로필 이미지
조훈(Hoon Jo)
지식공유자

안녕하세요

현재 강의는 온라인으로 구성된 강의에 대한 질문을 받고 있어서요.

책 자체 구성에 대한 것은 문제가 확실하게 확인된다면 깃허브 issue를 이용하시는게 좋으실 것 같습니다.

estar987님의 프로필 이미지

작성한 질문수

질문하기