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

error pushing image: failed to push to destination https://xxxxxx Patch https://xxxxxx: unexpected EOF #2167

Open
dfdf10086 opened this issue Jul 8, 2022 · 2 comments

Comments

@dfdf10086
Copy link

The directory structure is as follows

.git
APP
www
Dockerfile
README.md

Dockerfile this way no problem

FROM alpine:latest
WORKDIR /app
COPY App /app/
COPY www /app/
COPY .git /app/
CMD ["sh", "-c", "ls /app"]

But the following error is reported:

FROM alpine:latest
WORKDIR /app
COPY . /app/
CMD ["sh", "-c", "ls /app"]

The error message is as follows:

INFO[0000] Using dockerignore file: /workspace/source/.dockerignore 
INFO[0000] Retrieving image manifest alpine:latest      
INFO[0000] Retrieving image alpine:latest from registry [index.docker.io](http://index.docker.io/) 
INFO[0004] Built cross stage deps: map[]                
INFO[0004] Retrieving image manifest alpine:latest      
INFO[0004] Returning cached image manifest              
INFO[0004] Executing 0 build triggers                   
INFO[0004] Unpacking rootfs as cmd COPY . /app/ requires it. 
INFO[0005] WORKDIR /app                                 
INFO[0005] cmd: workdir                                 
INFO[0005] Changed working directory to /app            
INFO[0005] Creating directory /app                      
INFO[0005] Taking snapshot of files...                  
INFO[0005] COPY . /app/                                 
INFO[0006] Taking snapshot of files...                  
INFO[0007] CMD ["sh", "-c", "echo /etc/passwd"]         
INFO[0007] Pushing image to [xxxxxxxxxxxxx/k8s/test:v1.0.10]
error pushing image: failed to push to destination [xxxxxxxxxxxxx/k8s/test:v1.0.10:] Patch "https://xxxxxxxxxxx/v2/k8s/test/blobs/uploads/e8b25de2-2858-4724-b0b5-bf17b6c4a755?_state=ck31Klc5I-5_I18X7tyR08j7Tg8O9DZ_Epnl00LdynZ7Ik5hbWUiOiJrOHMvdGVzdCIsIlVVSUQiOiJlOGIyNWRlMi0yODU4LTQ3MjQtYjBiNS1iZjE3YjZjNGE3NTUiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjItMDctMDhUMDk6NTA6MDAuNDgwMDI5OTU0WiJ9": unexpected EOF

Please help me out

@aaron-prindle
Copy link
Collaborator

aaron-prindle commented Jun 25, 2023

@dfdf10086 can you specify the args passed to kaniko as well (with information redacted as needed?) to help with repro? Additionally were you able to resolve this issue? Thanks

@aaron-prindle aaron-prindle added needs-follow-up and removed needs-discussion Items which need more discussion before commitment labels Jun 25, 2023
@amanandh1
Copy link

@aaron-prindle ,
I'm also facing the same issue while trying to push a large image (~4 GB) to Gitlab package registry. It works when I use image: mgit/base:kaniko-executor-debug-stable.
Do you have any idea why the kanko package from google is not working and is there any fix?

..
..
image:
name: gcr.io/kaniko-project/executor:v1.19.0-debug
entrypoint: [""]
..
script:
- mkdir -p /kaniko/.docker
- >-
echo "{"auths":{"${CI_REGISTRY}":{"auth":"$(printf "%s:%s"
"${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d
'\n')"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context ${CI_PROJECT_DIR}/xx
--dockerfile ${CI_PROJECT_DIR}/Dockerfile
--destination xx

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

3 participants