concourse / docker-image-resource

a resource for docker images
Apache License 2.0
166 stars 260 forks source link

Docker seems to be hanging on startup #166

Closed xtreme-shane-lattanzio closed 6 years ago

xtreme-shane-lattanzio commented 6 years ago

After the merging of PR #144, we seem to be hanging when our pipeline is trying to startup the docker image. Going back to the docker tag pr-141 results in the hang no longer occurring.

We are calling the startup in the following way:

#!/bin/bash

set -e

apk update && apk add git
source /opt/resource/common.sh
start_docker

The following is the log we are receiving on our build:

Pulling concourse/docker-image-resource@sha256:aeac7e14daa1d8e556b8164d2c854d97fd28bd5dfbde19f971991f8f9226a167...
sha256:aeac7e14daa1d8e556b8164d2c854d97fd28bd5dfbde19f971991f8f9226a167: Pulling from concourse/docker-image-resource
98b11b540f87: Pulling fs layer
498d824e74ab: Pulling fs layer
4a75503fc93e: Pulling fs layer
62ad30ae128c: Pulling fs layer
98b11b540f87: Verifying Checksum
98b11b540f87: Download complete
4a75503fc93e: Verifying Checksum
4a75503fc93e: Download complete
98b11b540f87: Pull complete
62ad30ae128c: Verifying Checksum
62ad30ae128c: Download complete
498d824e74ab: Verifying Checksum
498d824e74ab: Download complete
498d824e74ab: Pull complete
4a75503fc93e: Pull complete
62ad30ae128c: Pull complete
Digest: sha256:aeac7e14daa1d8e556b8164d2c854d97fd28bd5dfbde19f971991f8f9226a167
Status: Downloaded newer image for concourse/docker-image-resource@sha256:aeac7e14daa1d8e556b8164d2c854d97fd28bd5dfbde19f971991f8f9226a167

Successfully pulled concourse/docker-image-resource@sha256:aeac7e14daa1d8e556b8164d2c854d97fd28bd5dfbde19f971991f8f9226a167.

fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
WARNING: This apk-tools is OLD! Some packages might not function properly.
v3.7.0-901-gcd62531396 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v3.7.0-899-g4460dd4f7e [http://dl-cdn.alpinelinux.org/alpine/edge/community]
OK: 9086 distinct packages available
WARNING: This apk-tools is OLD! Some packages might not function properly.
(1/5) Installing libssh2 (1.8.0-r2)
7  0%                                                                           8(2/5) Installing libcurl (7.57.0-r0)
7  1%                                                                           8(3/5) Installing expat (2.2.5-r0)
7  4% ###                                                                       8(4/5) Installing pcre2 (10.30-r0)
7  5% ####                                                                      87  9% ######                                                                    8(5/5) Installing git (2.15.0-r1)
7  9% #######                                                                   87 23% #################                                                         87 30% ######################                                                    87 38% ############################                                              87 39% ############################                                              87 39% #############################                                             87 46% ##################################                                        87 54% ########################################                                  87 61% #############################################                             87 69% ###################################################                       87 76% ########################################################                  87 77% #########################################################                 87 84% ##############################################################            87 85% ##############################################################            87 92% ####################################################################      87 99% ######################################################################### 87100% ##########################################################################8Executing busybox-1.27.2-r6.trigger
OK: 129 MiB in 32 packages
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
waiting for docker to come up...
imhotepisinvisible commented 6 years ago

This is an annoying one - especially as the change comes with no warning if using concourse/docker-image-resource directly. The fix appears to be to change the start_docker line to start_docker 3 3 (or other numbers to suit).

vito commented 6 years ago

To be fair, this is an unsupported use of the image, not of the resource. I don't think this is a valid issue, to be honest; this repo isn't maintained as a general Docker image for use in tasks, it's purely for the resource.

I would recommend using one of the following images instead: