Docker push 报错:received unexpected HTTP status: 500 Internal Server Error

摘要:
现象描述将镜像推送到私有仓库,出现错误“receivedunexpectedHTTPstatus:500InternalServerError”[root@docker~]#dockerimagesREPOSITORYTAGIMAGEIDCREATEDSIZEdocker.io/nginx1.18.0b5390718bd8e6daysago132.8MBdocker.io/registrylate

现象描述

将镜像推送到私有仓库,出现错误“received unexpected HTTP status: 500 Internal Server Error”

[root@docker ~]# docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
docker.io/nginx      1.18.0              b5390718bd8e        6 days ago          132.8MB
docker.io/registry   latest              2d4f4b5309b1        4 months ago        26.22MB
[root@docker ~]# docker tag docker.io/nginx:1.18.0 192.168.1.31:5000/nginx:1.18.0[root@docker ~]#docker push 192.168.1.31:5000/nginx:1.18.0The push refers to a repository [192.168.1.31:5000/nginx]
350c442bd17b: Retrying in 1second 
11ebfd90bb46: Retrying in 1second 
77a84e783709: Retrying in 1second 
8ea8cf9de1a9: Retrying in 1second 
d0fe97fa8b8c: Retrying in 1second 
received unexpected HTTP status: 500 Internal Server Error

解决办法:

关闭SELinux。

临时关闭SELinux:

[root@docker ~]# setenforce 0

永久关闭,重启后生效:

[root@docker ~]# sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config 
[root@docker ~]# egrep '^SELINUX=' /etc/selinux/config 
SELINUX=disabled

关闭SELinux 之后, docker push 就可以了。

[root@docker ~]# docker push 192.168.1.31:5000/nginx:1.18.0The push refers to a repository [192.168.1.31:5000/nginx]
350c442bd17b: Pushed 
11ebfd90bb46: Pushed 
77a84e783709: Pushed 
8ea8cf9de1a9: Pushed 
d0fe97fa8b8c: Pushed 
1.18.0: digest: sha256:4528b7efb5e09b3ef22a4a049e839164d50ccac1aaf3170ac75fe12fd1181f6b size: 1362

免责声明:文章转载自《Docker push 报错:received unexpected HTTP status: 500 Internal Server Error》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Apache Dubbohttps、公钥,私钥,数字证书下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Jenkins和Gitlab CI/CD自动更新k8s中pod使用的镜像说明

Jenkins 使用Jenkins的话,完成的工作主要有如下步骤:1.从Gogs或Gitlab仓库上拉取代码2.使用Maven编译代码,打包成jar文件3.根据jar文件使用相对应的Dockerfile文件制作成Docker镜像4.把Docker镜像推送到Nexus上的Docker仓库(或者Harbor仓库)5.运行shell脚本,给k8s的master主...

Docker安装及基本使用方法

Docker安装 CentOS6上安装Docker # yum -y install epel-release # yum -y install docker-io CentOS7上安装Docker # yum -y install docker 启动Docker # /etc/init.d/docker start 如果启动后无进程,日志中出现: /us...

记录一次docker报错

最近新搭建了一台docker服务器,把本地镜像load导入的时候报错:devmapper:ThinPoolhas163029freedatablockswhichislessthanminimumrequired163840freedatablocks.Createmorefreespaceinthinpoolorusedm.min_free_spaceo...

CentOS7 docker开启tcp端口并进行客户端远程连接

#docker版本:18.09.0,最好保证客户端端口和服务端端口相同 [root@Centos7 ~]# dockerd-ce -v Docker version 18.09.0, build 4d60db4 网络环境概述 server:192.168.100.7:2375 client:192.168.100.8 #docker默认只提供本地u...

使用Docker搭建MySQL主从复制(一主一从)

简介 因为个人资源有限,手里没有太多的服务器,只能通过docker来进行mysql的主从搭建。原理基本上都是一致的,在实际生产中,也可以按照该方式进行搭建。如果对Docker还不是很了解,请移步Docker官网进行学习! 使用Docker搭建主从 使用Docker拉取MySQL镜像,使用5.7版本 我们可以先使用search命令查询一下mysql镜像,...

Docker 面试题(一)

什么是Docker? Docker是一个容器化平台,它以容器的形式将您的应用程序及其所有依赖项打包在一起,以确保您的应用程序在任何环境中无缝运行。   CI(持续集成)服务器的功能是什么? CI功能就是在每次提交之后不断地集成所有提交到存储库的代码,并编译检查错误 什么是Docker镜像? Docker镜像是Docker容器的源代码,Docker镜像用于创...