New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Build Image fails with 'NOT FOUND' executing download-frozen-image-v2.sh #21528

Closed
ddd opened this Issue Mar 25, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@ddd

ddd commented Mar 25, 2016

Output of docker version:

$ docker version
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 21:49:11 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 21:49:11 2016
 OS/Arch:      linux/amd64

Output of docker info:

$ docker info
Containers: 3
 Running: 0
 Paused: 0
 Stopped: 3
Images: 58
Server Version: 1.10.3
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 210
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: host bridge null
Kernel Version: 4.1.19-boot2docker
Operating System: Boot2Docker 1.10.3 (TCL 6.4.1); master : 625117e - Thu Mar 10 22:09:02 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 996.1 MiB
Name: default
ID: CZU6:7BPQ:NAMR:33VL:H3QW:JPUP:LHOT:BDTQ:YF2X:MG5V:GHIW:66H7
Debug mode (server): true
 File Descriptors: 10
 Goroutines: 22
 System Time: 2016-03-25T19:53:05.698282158Z
 EventsListeners: 0
 Init SHA1:
 Init Path: /usr/local/bin/docker
 Docker Root Dir: /mnt/sda1/var/lib/docker
Username: deryldowney
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox

Additional environment details (AWS, VirtualBox, physical, etc.):

Current Docker Toolbox on Windows 10 amd64. Dell Inspiron 5555 with 12GB RAM.

Steps to reproduce the issue:

  1. Follow https://docs.docker.com/opensource/project/set-up-dev-env/ down to 'Build Image' step 4.
  2. Run docker build -t dry-run-test .
  3. Consistently fails on step 42 of build.

Describe the results you received:
Error output is as follows:

Step 37 : WORKDIR /go/src/github.com/docker/docker
 ---> Running in 415e177afeed
 ---> 60cc8fa93076
Removing intermediate container 415e177afeed
Step 38 : ENV DOCKER_BUILDTAGS apparmor seccomp selinux
 ---> Running in 49228f1e01b4
 ---> b1de35fcee7f
Removing intermediate container 49228f1e01b4
Step 39 : RUN ln -sfv $PWD/.bashrc ~/.bashrc
 ---> Running in 98cdf5822f70
'/root/.bashrc' -> '/go/src/github.com/docker/docker/.bashrc'
 ---> 70a4b9833f14
Removing intermediate container 98cdf5822f70
Step 40 : RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker
 ---> Running in dd464e633d5e
'/etc/bash_completion.d/docker' -> '/go/src/github.com/docker/docker/contrib/completion/bash/docker'
 ---> dc38e9b52bf9
Removing intermediate container dd464e633d5e
Step 41 : COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
 ---> 47f7f968aee0
Removing intermediate container 82c65fb95a9a
Step 42 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images       buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd559
9a9523882c6dfc567f2e9ef7cf6f79db6       busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0  debian:jessi
e@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e       hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa66
58d13f6dfb8bc72074cc1ca36966a7
 ---> Running in f23e2bd82127
/bin/sh: 1: ./contrib/download-frozen-image-v2.sh: not found
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images     buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bda
f30dd5599a9523882c6dfc567f2e9ef7cf6f79db6       busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0  debi
an:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e       hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe
2610fa6658d13f6dfb8bc72074cc1ca36966a7' returned a non-zero code: 127

Checking for existence of download-frozen-image-v2.sh shows:

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ pwd
/c/Users/david/Projects/docker/docker-fork

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ ls -alh ./contrib/download-frozen-image-v*.sh
-rwxr-xr-x 1 david 197610 3.9K Mar 25 13:24 ./contrib/download-frozen-image-v1.sh*
-rwxr-xr-x 1 david 197610 4.2K Mar 25 13:24 ./contrib/download-frozen-image-v2.sh*

Describe the results you expected:
Expected build process to complete.

Additional information you deem important (e.g. issue happens only occasionally):

This creates a untagged, non-repository linked image.

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              47f7f968aee0        14 minutes ago      1.875 GB

The image can not be deleted using docker rmi <IMAGE_ID> until the build container is removed as follows:

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ docker rmi 47f7f968aee0
Failed to remove image (47f7f968aee0): Error response from daemon: conflict: unable to delete 47f7f968aee0 (must be forced) - image is being
 used by stopped container f23e2bd82127

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ docker rm f23e2bd82127
f23e2bd82127

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ docker rmi 47f7f968aee0
Deleted: sha256:47f7f968aee0b1c68cb7515a64835baf92046ed20654c92022dff68e9800afbc
Deleted: sha256:6ff65ac0403dde8a53bde304aadd81762abc3bbdea8f7ad4be7564e515aaffb8
Deleted: sha256:dc38e9b52bf9e7ebdf0a31a8e5eb98c01106ab0aa3d479cf54365614a1e44419
Deleted: sha256:158a2c469695a09fd0884354f48a8dfb54f6b55a7e3a63c19ecd7c033cf7c85c
Deleted: sha256:70a4b9833f149cfc24e7920dcfa347ebf41a334c6c196a8110b870e91b067b95
Deleted: sha256:69258d36e74dce1451a4ba516267e845dce5b7b43940f0d21e831afec2959aa4
Deleted: sha256:b1de35fcee7f40d05b5d35c981ce5f2ca9649a039d02c0b227978921c4fc73d9
Deleted: sha256:60cc8fa93076535d5ec043af28301b88e1765653aa99026c5ad3e2173cb568d4
Deleted: sha256:2685729eb3edabdab274741ebbf432f0f1d30043f655c885883775404f5abd12
Deleted: sha256:3e825fcd26f5d0a7fca5e88598a15d8a3de79ba29fdb03a6340f1b769fea6849
Deleted: sha256:545549e2f08ef051a8bb78ac4b36d136d06600db31ba301cdcefbebe089d984e
Deleted: sha256:b3a297e97c34938c7cdb33294aa474c181b462dc93b4111e2485f6a9b4807594
Deleted: sha256:e9c94d6b221453ac1b94dd7e9a9b72b22bd954891939647c53b12951d3830c4b
Deleted: sha256:5ccb81d77f86a00b594520ca6649665a6b1d7d096891e966ad4255f15c16918d
Deleted: sha256:b318e7c8444ca150becc7693f7aedca20ffcf3433c4bef67d0d3ed38622d92b1
Deleted: sha256:10c851140e3005ec9e06d88a9e15d947e2725e7eedbf1a262287b9f9e1055750
Deleted: sha256:234dcb4ad23f07e899868ca01c4bf8fcac458ace012d621caf72c27c7da818ee
Deleted: sha256:ebee6aa3bdad313ecde14b73730ee4a149eba13396f0dcd72353a213dc2af2e4
Deleted: sha256:68ac9b9b72d24d6421a9d96f10bdcf8bc9afb333f5288050c4cfa779543b2352
Deleted: sha256:66e0ba094fed93664c205b7683ea7acbcab5a3de39f4cdcb38741cd82f0dd253
Deleted: sha256:b03814fc9fee9c71a144e45d46f769c08143d148f109857c965cb1486cbbc177
Deleted: sha256:b7c47c0d9050389ab94af66a06a090d61434e0b0e855c8119b3ae3e40f51adf0
Deleted: sha256:e2ed8437e31c7ea3c452cf0f1ed8a204ff81f740b6482083e97bf0f01387b686
Deleted: sha256:72c3d288ab63405c66f1e47e5d45cca71274f9b1f9b1d635b07fb51b4aa8300b
Deleted: sha256:75993f8ad608299d0a8e3dfa6e86deff28c1c595375b0f789c23287cfad53231
Deleted: sha256:82b63155853837cd3fbb249abb9bc3bf4979ed9ad6ded15c6ef7cc728f705611
Deleted: sha256:5d15f3b9c67a56e848204118b2497976e30a27b984105439b6c929814dec9847
Deleted: sha256:922b1bb898cc29aba66488cc98f0e639afa7a4a7894a61c58998ea6e724cd4ee
Deleted: sha256:856d837e8e8a9e251ab6a78fd26c4ef42058a647985242c3adf810f3f4804b4a
Deleted: sha256:89a30036495bdd54c8b6f4551107920c2dcce4705dbf51ceff6b4371aac0b69a
Deleted: sha256:ddbc1ec936150ceacff5ef5356a11040fd25d228307f2042f8d703c8f67e3316
Deleted: sha256:9eb5b20548b449f1ada1b96a32dae22f79f5cbc00ac6bcf06e5d4ba69778e26b
Deleted: sha256:f7a197066752edebcff500a79e7a1fbc2081da48bbd5ba511404544c6f580031
Deleted: sha256:474e3183dd9d76bb3f33313740c511593e5be809eb7c64c0af03572ae757f3ad
Deleted: sha256:2ddc525c23e26b8f23fab73cf1e239826d42f8538f80b955cf59be00087c9e7e
Deleted: sha256:6d2f9bfc879871a6a21b5797bd72852023de302b09fffe93bf50aae30bc2568c
Deleted: sha256:f845a7f114ee317a45b0e5713595c428646bd78e54aca80f196d0d9c1e387c7f
Deleted: sha256:17d60989a1a6d38a15d8122690ac5264ddc217eb773672ded0c13df6ec901e84
Deleted: sha256:13b95f654f920448f31e0fd50429f98c4fa0d1e3af4bc22aefea5ce6c0f47c3c
Deleted: sha256:743b280edf54d9a4c9ec6b2fc49dce7623d36d4a5c3a4d55fe3ebfd1f88f6ec3
Deleted: sha256:b5a176b91209ba26ac5543c75659baabce67ae78c6884da0817203b12dd9de81
Deleted: sha256:7bc5d2b36d479a79714409a5d72d320e39827465bbf66d7fe8a042a1fa3e5cd7
Deleted: sha256:b091a577f313009d0cb7910d0d17d36163df78f1e1acea8d9277a42342b69c58
Deleted: sha256:e4071d0a4d0f7c09a63f7d60d5f317878dd6823750bf4476e6e149ef58e3ac11
Deleted: sha256:60e37e968eb38a965f788c8a10d2fc332ce3b371da603cebb71be1d1f8a2d165
Deleted: sha256:46b80fefcedc5a99fdb01911ebae2b63c88829bfe3450d3275f7617d8e3a3db1
Deleted: sha256:0f772c59a58801d58d012fd7520e211f60f275a0d457e15bf4c0bfd4a94b464d
Deleted: sha256:1363ecb5da59db280cff795fcc60315025cb46843d9d6478ccd8b22f84fe69e9
Deleted: sha256:e9d436263704f15388dde5291ec9b1cebc33dab052ba7b2940f8165be24c39f4
Deleted: sha256:9ade9e213724bca86fab4b98ce0cd3478853bcf2e76a5eea10499cf2fb29a97c
Deleted: sha256:c2d1f6eda10e92645bac60e9ce13cc6fe2984110b1b4b3bbdde3a23df49b572c
Deleted: sha256:568af2dacbd331551f023fe536d652378f0544239cd4fd2c5e7d5230fb608ec4
Deleted: sha256:8656ad0102b53bd9ac5c4f7f71fb20633462f131247b6c153d95a43a68b7c34d
Deleted: sha256:1eedb1cc78b45d8aafa11cb3650c2ee8e2cf473fc416769c70c6b6ec80025d3e
Deleted: sha256:6f8b97be69ba523ee7323e801ff32d77d1e8ed220f0bf92e55a5131c754f7977
Deleted: sha256:6bd17a45e903a718bf47fad4c3d732cc5525e9ee508724b997a92f99df05da8d
Deleted: sha256:bf6392c884b2f5d434342002b2d93f56089bd8b76ac06a5a11d8d8a49878326d
Deleted: sha256:831ed7e86f3ff2d53a74124a4e3dc6169045834d3ad548e10939b86f9e4dd182
Deleted: sha256:38fd2a970fd6122901d9189edab63c67e78891b496cd06879f4bee937fe12783
Deleted: sha256:6a8bb21ec34d1dac645ec0ed43f63d1225576445f11be8a83697a1d216fb3d44
Deleted: sha256:350ac4981e185f47a5ef1f538f3d6191e83eb787e79fa9909ea5fc3d09cb8875
Deleted: sha256:cd5f9e1dce5a21a9ea7d8d0f100f221118c0e8b4463ef6f2a1815317114e4abb
Deleted: sha256:182bb2a33b250d88b0e87b975ddb4dcda2c391f85972fece894462d47b1afcc1

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Mar 26, 2016

Member

Can you check if those files happen to be checked out with Windows line-endings? (\r\n), it's possible that the "not found" message is actually because the script is using the wrong line endings (e.g. http://stackoverflow.com/questions/7362504/bash-script-always-prints-command-not-found)

Member

thaJeztah commented Mar 26, 2016

Can you check if those files happen to be checked out with Windows line-endings? (\r\n), it's possible that the "not found" message is actually because the script is using the wrong line endings (e.g. http://stackoverflow.com/questions/7362504/bash-script-always-prints-command-not-found)

@ddd

This comment has been minimized.

Show comment
Hide comment
@ddd

ddd Mar 26, 2016

I got the following:

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ file --mime-encoding --mime-type contrib/download-frozen-image-v2.sh
contrib/download-frozen-image-v2.sh: text/x-shellscript; charset=us-ascii

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ file contrib/download-frozen-image-v2.sh
contrib/download-frozen-image-v2.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators

I wonder, is it possible to determine the OS the scripts are being run on in order to automatically change the line endings, even if its a simple sed scripted change?

ddd commented Mar 26, 2016

I got the following:

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ file --mime-encoding --mime-type contrib/download-frozen-image-v2.sh
contrib/download-frozen-image-v2.sh: text/x-shellscript; charset=us-ascii

david@DERYL-DELL-INSPIRON MINGW64 ~/Projects/docker/docker-fork (dry-run-test)
$ file contrib/download-frozen-image-v2.sh
contrib/download-frozen-image-v2.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators

I wonder, is it possible to determine the OS the scripts are being run on in order to automatically change the line endings, even if its a simple sed scripted change?

@ddd

This comment has been minimized.

Show comment
Hide comment
@ddd

ddd Mar 27, 2016

@thaJeztah Thanks Sebastiaan! I've set git config --global core.autocrlf true for now. I'm rerunning the build to see if that fixes it. Since there is no .gitattributes file in the docker/docker repository, I don't know what line endings your group is enforcing. I'll post the outcome, and if the above configuration option fixes the issue, I'll close this Issue. If not, could you post what is expected if a .gitattributes were theoretically added to the repo? Thank you!

PS: My apologies for the almost 24h reply. Family life took precedence.

ddd commented Mar 27, 2016

@thaJeztah Thanks Sebastiaan! I've set git config --global core.autocrlf true for now. I'm rerunning the build to see if that fixes it. Since there is no .gitattributes file in the docker/docker repository, I don't know what line endings your group is enforcing. I'll post the outcome, and if the above configuration option fixes the issue, I'll close this Issue. If not, could you post what is expected if a .gitattributes were theoretically added to the repo? Thank you!

PS: My apologies for the almost 24h reply. Family life took precedence.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Mar 27, 2016

Member

@ddd no worries about the delay in response; there's more important things in life than a GitHub repository!

I actually made a note to look into adding a .gitattributes file to the repository; when Docker started, the user base was basically 100% linux users, so line-endings weren't an issue, now that Windows is a "thing" for Docker, we should take that into account, and adding a .gitattributes could help make that easier.

For shell-scripts, Linux line endings (\n) should be used (and, I think for most other files as well), but we may end up with the odd .bat file for Windows, so I should have a look if we have any, and if we do, add that to the .gitattributes if needed.

Let me hear how it works out! (And, no need to hurry, enjoy your weekend and Easter if you celebrate that)

Member

thaJeztah commented Mar 27, 2016

@ddd no worries about the delay in response; there's more important things in life than a GitHub repository!

I actually made a note to look into adding a .gitattributes file to the repository; when Docker started, the user base was basically 100% linux users, so line-endings weren't an issue, now that Windows is a "thing" for Docker, we should take that into account, and adding a .gitattributes could help make that easier.

For shell-scripts, Linux line endings (\n) should be used (and, I think for most other files as well), but we may end up with the odd .bat file for Windows, so I should have a look if we have any, and if we do, add that to the .gitattributes if needed.

Let me hear how it works out! (And, no need to hurry, enjoy your weekend and Easter if you celebrate that)

@ddd

This comment has been minimized.

Show comment
Hide comment
@ddd

ddd Mar 29, 2016

STATUS UPDATE: Haven't been able to get back to the issue due to family concerns. I apologize for the delay. I'll try to re-run the process tree tonight. Hope you enjoyed your Easter! :-)

ddd commented Mar 29, 2016

STATUS UPDATE: Haven't been able to get back to the issue due to family concerns. I apologize for the delay. I'll try to re-run the process tree tonight. Hope you enjoyed your Easter! :-)

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Apr 28, 2016

Member

I'll close this issue, but let me know if it worked out for you

Member

thaJeztah commented Apr 28, 2016

I'll close this issue, but let me know if it worked out for you

@srikanteswartalluri

This comment has been minimized.

Show comment
Hide comment
@srikanteswartalluri

srikanteswartalluri Feb 24, 2017

I am hitting the same issue while setting up the docker dev env on mac.

---> b348bdd9bdd8
Step 47/53 : COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
---> Using cache
---> e2d156503b4b
Step 48/53 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd5599a9523882c6dfc567f2e9ef7cf6f79db6 busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
---> Running in bbe4c55245fa
: No such file or directory
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd5599a9523882c6dfc567f2e9ef7cf6f79db6 busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7' returned a non-zero code: 127
make: *** [build] Error 127

srikanteswartalluri commented Feb 24, 2017

I am hitting the same issue while setting up the docker dev env on mac.

---> b348bdd9bdd8
Step 47/53 : COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
---> Using cache
---> e2d156503b4b
Step 48/53 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd5599a9523882c6dfc567f2e9ef7cf6f79db6 busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
---> Running in bbe4c55245fa
: No such file or directory
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd5599a9523882c6dfc567f2e9ef7cf6f79db6 busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7' returned a non-zero code: 127
make: *** [build] Error 127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment