Skip to content
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

Unable to install docker-credential-ecr-login using watchtower dockerfile #1719

Closed
Ostico opened this issue Aug 7, 2023 · 5 comments
Closed

Comments

@Ostico
Copy link

Ostico commented Aug 7, 2023

Describe the bug

From Watchtower documentation:

https://containrrr.dev/watchtower/private-registries/#example

This Dockerfile fail to build.

Steps to reproduce

  1. Just follow the documentation at: https://containrrr.dev/watchtower/private-registries/#example

Expected behavior

Should compile the go binary executable.

Screenshots

No response

Environment

  • Platform: Ubuntu 22.04.2 LTS
  • Architecture: Linux 5.19.0-1025-aws # 26~22.04.1-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
  • Docker Version: Docker version 24.0.5, build ced0996

Your logs

credential-helper# docker build --no-cache -t credential-helper .
[+] Building 33.6s (5/8)                                                                                                                                                                                                                                                   docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 350B                                                                                                                                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/golang:1.16                                                                                                                                                                                                                       0.0s
 => CACHED [1/5] FROM docker.io/library/golang:1.16                                                                                                                                                                                                                                  0.0s
 => ERROR [2/5] RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login                                                                                                                                                             33.3s
------                                                                                                                                                                                                                                                                                    
 > [2/5] RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login:                                                                                                                                                                         
33.00 # github.com/awslabs/amazon-ecr-credential-helper/ecr-login/vendor/golang.org/x/sys/unix                                                                                                                                                                                            
33.00 src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/vendor/golang.org/x/sys/unix/syscall.go:83:16: undefined: unsafe.Slice                                                                                                                                                
33.00 src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/vendor/golang.org/x/sys/unix/syscall_linux.go:1018:20: undefined: unsafe.Slice                                                                                                                                        
33.00 src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/vendor/golang.org/x/sys/unix/syscall_linux.go:2297:9: undefined: unsafe.Slice                                                                                                                                         
33.00 src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
33.00 src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice
------
Dockerfile:7
--------------------
   5 |     ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
   6 |     
   7 | >>> RUN go get -u $REPO
   8 |     
   9 |     RUN rm /go/bin/docker-credential-ecr-login
--------------------
ERROR: failed to solve: process "/bin/sh -c go get -u $REPO" did not complete successfully: exit code: 2


### Additional context

It worked for previous ( more than 1 months ago ) installations.
When today I tried to install in a new EC2 i got the issue.
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@Ostico
Copy link
Author

Ostico commented Aug 7, 2023

Update: it worked changing the Dockerfile and using golang:1.18.

credential-helper# docker build --no-cache -t credential-helper .
[+] Building 64.4s (9/9) FINISHED                                                                                                                                                                                                                                          docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 350B                                                                                                                                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/golang:1.18                                                                                                                                                                                                                       1.6s
 => [1/5] FROM docker.io/library/golang:1.18@sha256:50c889275d26f816b5314fc99f55425fa76b18fcaf16af255f5d57f09e1f48da                                                                                                                                                                26.7s
 => => resolve docker.io/library/golang:1.18@sha256:50c889275d26f816b5314fc99f55425fa76b18fcaf16af255f5d57f09e1f48da                                                                                                                                                                 0.0s
 => => sha256:50c889275d26f816b5314fc99f55425fa76b18fcaf16af255f5d57f09e1f48da 2.36kB / 2.36kB                                                                                                                                                                                       0.0s
 => => sha256:740324e52de766f230ad7113fac9028399d6e03af34883de625dc2230ef7927e 1.80kB / 1.80kB                                                                                                                                                                                       0.0s
 => => sha256:c37a56a6d65476eabfb50e74421f16f415093e2d1bdd7f83e8bbb4b1a3eb2109 7.12kB / 7.12kB                                                                                                                                                                                       0.0s
 => => sha256:f049f75f014ee8fec2d4728b203c9cbee0502ce142aec030f874aa28359e25f1 5.16MB / 5.16MB                                                                                                                                                                                       0.5s
 => => sha256:56261d0e6b05ece42650b14830960db5b42a9f23479d868256f91d96869ac0c2 10.88MB / 10.88MB                                                                                                                                                                                     0.6s
 => => sha256:bbeef03cda1f5d6c9e20c310c1c91382a6b0a1a2501c3436b28152f13896f082 55.03MB / 55.03MB                                                                                                                                                                                     1.0s
 => => sha256:bfcb68b5bd105d3f88a2c15354cff6c253bedc41d83c1da28b3d686c37cd9103 85.98MB / 85.98MB                                                                                                                                                                                     3.8s
 => => sha256:9bd150679dbdb02d9d4df4457d54211d6ee719ca7bc77747a7be4cd99ae03988 54.58MB / 54.58MB                                                                                                                                                                                     2.8s
 => => sha256:06d0c5d18ef41fa1c2382bd2afd189a01ebfff4910b868879b6dcfeef46bc003 141.98MB / 141.98MB                                                                                                                                                                                   5.5s
 => => extracting sha256:bbeef03cda1f5d6c9e20c310c1c91382a6b0a1a2501c3436b28152f13896f082                                                                                                                                                                                            6.6s
 => => sha256:cc7973a07a5b4a44399c5d36fa142f37bb343bb123a3736357365fd9040ca38a 156B / 156B                                                                                                                                                                                           4.0s
 => => extracting sha256:f049f75f014ee8fec2d4728b203c9cbee0502ce142aec030f874aa28359e25f1                                                                                                                                                                                            0.4s
 => => extracting sha256:56261d0e6b05ece42650b14830960db5b42a9f23479d868256f91d96869ac0c2                                                                                                                                                                                            0.4s
 => => extracting sha256:9bd150679dbdb02d9d4df4457d54211d6ee719ca7bc77747a7be4cd99ae03988                                                                                                                                                                                            4.0s
 => => extracting sha256:bfcb68b5bd105d3f88a2c15354cff6c253bedc41d83c1da28b3d686c37cd9103                                                                                                                                                                                            4.3s
 => => extracting sha256:06d0c5d18ef41fa1c2382bd2afd189a01ebfff4910b868879b6dcfeef46bc003                                                                                                                                                                                            8.9s
 => => extracting sha256:cc7973a07a5b4a44399c5d36fa142f37bb343bb123a3736357365fd9040ca38a                                                                                                                                                                                            0.0s
 => [2/5] RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login                                                                                                                                                                   31.4s
 => [3/5] RUN rm /go/bin/docker-credential-ecr-login                                                                                                                                                                                                                                 0.7s
 => [4/5] RUN go build  -o /go/bin/docker-credential-ecr-login  /go/src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login                                                                                                                    2.3s
 => [5/5] WORKDIR /go/bin/                                                                                                                                                                                                                                                           0.1s
 => exporting to image                                                                                                                                                                                                                                                               1.4s
 => => exporting layers                                                                                                                                                                                                                                                              1.4s
 => => writing image sha256:7a2439b8e247451caeb55c24c4ccff5bf3dd2fe10aabf6cf78741623ab7cddab                                                                                                                                                                                         0.0s
 => => naming to docker.io/library/credential-helper  

Understanding that the addressing and the resolution of the problem may not be immediate, I would like to kindly suggest considering an update to the documentation.

Thank you.

@cloudsbird
Copy link

HI @Ostico I have update the documentation now #1744

@piksel
Copy link
Member

piksel commented Sep 10, 2023

Fixed in #1749 (duplicate, again, sorry for note noticing this earlier).

@piksel piksel closed this as completed Sep 10, 2023
@GugaZC
Copy link

GugaZC commented Mar 8, 2024

Hi, could someone update the documentation? This link still references version 1.17.

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

No branches or pull requests

4 participants