I’ve tried to push the docker images to the remote repository. But every operation gets failed.
Either I get EOF exception like below
My-MacBook-Pro-2 producer % docker push <awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/producer:latest
The push refers to repository [<awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/producer]
c7890551eec4: Waiting
b32c59a2510d: Waiting
3d898485473e: Waiting
5b316a2cb183: Waiting
a0ee1f650005: Waiting
45dff4c2315c: Waiting
failed to do request: Head "https://<awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/v2/producer/blobs/sha256:c7890551eec49eefdd40b2b56d0e2f2f575641ed7de0c1da92ad94d63311b449": EOF
Or broken pipe error like below
My-MacBook-Pro-2 producer % docker push <awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/producer:latest
The push refers to repository [<awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/producer]
3d898485473e: Pushing [==========> ] 6.488MB/30.05MB
45dff4c2315c: Pushing [==================================================>] 1.566MB/1.566MB
a0ee1f650005: Layer already exists
5b316a2cb183: Pushing [=> ] 5.636MB/195.2MB
c7890551eec4: Already exists
b32c59a2510d: Pushing [===================> ] 6.783MB/17.82MB
failed to copy: failed to do request: Put "https://<awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/v2/producer/blobs/uploads/7127e92e-d7a7-4147-984e-3dbdf8f12f0f?digest=sha256%3A3d898485473e3507374cea2e09f019c2ff5728f0911aa36c70b7a7235e9bc8ac": write tcp 192.168.65.3:58604->192.168.65.1:3128: write: broken pipe
or Closed connection error like below
My-MacBook-Pro-2 producer % docker push <awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/producer:latest
The push refers to repository [<awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/producer]
a0ee1f650005: Layer already exists
c7890551eec4: Already exists
b32c59a2510d: Pushing [======================> ] 7.93MB/17.82MB
3d898485473e: Pushing [=============> ] 7.93MB/30.05MB
5b316a2cb183: Pushing [==> ] 7.864MB/195.2MB
45dff4c2315c: Pushed
failed to copy: failed to do request: Put "https://<awsAccountId>.dkr.ecr.ap-south-1.amazonaws.com/v2/producer/blobs/uploads/1867b7ba-801e-473d-b876-3d605b084822?digest=sha256%3Ab32c59a2510d79e17fa6c4c4598df1fa2a9d03967a435984e9fd8231d9d7b541": write tcp 192.168.65.3:59342->192.168.65.1:3128: use of closed network connection
I’m having good network connection and attached an image for reference. Also the user has proper permissions to push the image to ECR. I’m facing the same problem if i try to push an image to docker hub.
Docker details
My-MacBook-Pro-2 producer % docker version
Client:
Version: 26.1.4
API version: 1.45
Go version: go1.21.11
Git commit: 5650f9b
Built: Wed Jun 5 11:26:02 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.31.0 (153195)
Engine:
Version: 26.1.4
API version: 1.45 (minimum version 1.24)
Go version: go1.21.11
Git commit: de5c9cf
Built: Wed Jun 5 11:29:12 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.33
GitCommit: d2d58213f83a351ca8f528a95fbd145f5654e957
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
I got stuck into this issue for 2 days. Can someone help me how to debug this and remediate from this problem?
Regarding the size of image, I’m just trying to run a basic spring boot app in docker. It won’t exceed 200 MB
Dockerfile Info
FROM openjdk:19-jdk-slim
WORKDIR /app
COPY target/*-SNAPSHOT.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","app.jar"]
My image has to be pushed to the remote repository. But it is not pushed even though the user has proper permissions and I’m having good network connection
sss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.