Issue
I am having an issue with compiling a project on a Docker image on DevOps. It is able to detect the Docker image on Docker hub (rel="nofollow noreferrer">https://hub.docker.com/r/cbica/captk_centos7) but always exits with an error (see the error log below). Any help on this would be appreciated. I use the Docker recipe show n in https://github.com/sarthakpati/CaPTk/blob/master/azure-pipelines.yml#L568
My goal is to compile a project under CentOS7 (to work around GLIBC-related issues). If there is an easier way to do this than what I am currently trying, I'd be open to suggestions.
##[section]Starting: Initialize containers
##[command]/usr/bin/docker version --format '{{.Server.APIVersion}}'
'1.40'
Docker daemon API version: '1.40'
##[command]/usr/bin/docker version --format '{{.Client.APIVersion}}'
'1.40'
Docker client API version: '1.40'
##[command]/usr/bin/docker ps --all --quiet --no-trunc --filter "label=d2053a"
##[command]/usr/bin/docker network prune --force --filter "label=d2053a"
##[command]/usr/bin/docker network create --label d2053a vsts_network_88501b8c5c7549288a654d9f53718359
06028db79a8db249cd0521df2062016b357b0b76e858d120278e1f49abf4d4a6
##[command]/usr/bin/docker pull cbica/captk_centos7:latest
latest: Pulling from cbica/captk_centos7
d8d02d457314: Pulling fs layer
e6b4a8076209: Pulling fs layer
aa45223c3dcd: Pulling fs layer
bc2e6b9f87ac: Pulling fs layer
142358fd6fa9: Pulling fs layer
ec2bc6aca1bb: Pulling fs layer
6237973dfaaf: Pulling fs layer
bcf64616410f: Pulling fs layer
534f6be65718: Pulling fs layer
bc2e6b9f87ac: Waiting
142358fd6fa9: Waiting
ec2bc6aca1bb: Waiting
6237973dfaaf: Waiting
bcf64616410f: Waiting
534f6be65718: Waiting
aa45223c3dcd: Verifying Checksum
aa45223c3dcd: Download complete
e6b4a8076209: Verifying Checksum
e6b4a8076209: Download complete
142358fd6fa9: Verifying Checksum
142358fd6fa9: Download complete
d8d02d457314: Verifying Checksum
d8d02d457314: Download complete
ec2bc6aca1bb: Verifying Checksum
ec2bc6aca1bb: Download complete
bc2e6b9f87ac: Verifying Checksum
bc2e6b9f87ac: Download complete
bcf64616410f: Verifying Checksum
bcf64616410f: Download complete
534f6be65718: Verifying Checksum
d8d02d457314: Pull complete
6237973dfaaf: Verifying Checksum
6237973dfaaf: Download complete
e6b4a8076209: Pull complete
aa45223c3dcd: Pull complete
bc2e6b9f87ac: Pull complete
142358fd6fa9: Pull complete
ec2bc6aca1bb: Pull complete
6237973dfaaf: Pull complete
bcf64616410f: Pull complete
534f6be65718: Pull complete
Digest: sha256:c0fe1b74db5b8251ac1be03edbaec1523682776e7acdaf97088f6ff3ec077ef9
Status: Downloaded newer image for cbica/captk_centos7:latest
docker.io/cbica/captk_centos7:latest
##[command]/usr/bin/docker inspect --format="{{index .Config.Labels \"com.azure.dev.pipelines.agent.handler.node.path\"}}" cbica/captk_centos7:latest
##[command]/usr/bin/docker create --name centos_cbicacaptk_centos7latest_07c02c --label d2053a --network vsts_network_88501b8c5c7549288a654d9f53718359 -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/vsts/work/1":"/__w/1" -v "/home/vsts/work/_temp":"/__w/_temp" -v "/opt/hostedtoolcache":"/__t" -v "/home/vsts/work/_tasks":"/__w/_tasks" -v "/home/vsts/agents/2.155.1/externals":"/__a/externals":ro -v "/home/vsts/work/.taskkey":"/__w/.taskkey" cbica/captk_centos7:latest "/__a/externals/node/bin/node" -e "setInterval(function(){}, 24 * 60 * 60 * 1000);"
fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389
##[command]/usr/bin/docker start fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389
fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389
##[command]/usr/bin/docker ps --all --filter id=fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389 --filter status=running --no-trunc --format "{{.ID}} {{.Status}}"
fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389 Up Less than a second
##[command]/usr/bin/docker exec fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389 sh -c "command -v bash"
Error response from daemon: Container fd8d03041af680f13e7feb451232e014f873d4565dd92a633dd815a5c259d389 is not running
##[error]Docker exec fail with exit code 1
##[section]Finishing: Initialize containers
Solution
I needed to follow the instructions here in the Azure Documentation to ensure the Docker was picked up properly. Basically, no ENTRYPOINT tag and ensuring that nodejs was installed.
Answered By - scap3y Answer Checked By - Candace Johnson (WPSolving Volunteer)