1
resposta

Problema no Hadolint

Segui perfeitamente a aula e estou recebendo o seguinte erro ao executar o build:

Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/todo-list-principal
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential github-ssh
Cloning the remote Git repository
Cloning repository https://github.com/gabrieldylanls/todo-list
 > git init /var/lib/jenkins/workspace/todo-list-principal # timeout=10
Fetching upstream changes from https://github.com/gabrieldylanls/todo-list
 > git --version # timeout=10
using GIT_SSH to set credentials github-ssh
 > git fetch --tags --progress -- https://github.com/gabrieldylanls/todo-list +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/gabrieldylanls/todo-list # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/gabrieldylanls/todo-list # timeout=10
Fetching upstream changes from https://github.com/gabrieldylanls/todo-list
using GIT_SSH to set credentials github-ssh
 > git fetch --tags --progress -- https://github.com/gabrieldylanls/todo-list +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 7a9f002630608493f4ec7fb00ff317b24a3949a2 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 7a9f002630608493f4ec7fb00ff317b24a3949a2
Commit message: "initial commmit"
 > git rev-list --no-walk 7a9f002630608493f4ec7fb00ff317b24a3949a2 # timeout=10
[todo-list-principal] $ /bin/sh -xe /tmp/jenkins9104590441787661765.sh
+ docker run --rm -i hadolint/hadolint:latest-debian
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
Build step 'Execute shell' marked build as failure
Finished: FAILURE
1 resposta

Olá Leomarques, tudo bem? Peço desculpas pela demora em ti responder! Você executou o processo pra expor o deamon do docker, esse processo foi realizado na aula 02: Atividade 04 - Configurando o daemon do Docker, porque o docker está retornando um erro de permissão, e executando esses passos dessa aula que permitimos ao Jenkins, controlar um docker remoto. Pode informar isso pra gente verificar?