Docker 镜像文件的上传
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Docker 镜像文件的上传相关的知识,希望对你有一定的参考价值。
制作一个去镜像,然后把它上传到hub.docker.com上去
(1)登入到以下网址,注册一个帐户名称
(2)在Docker主机上进行登陆
[[email protected] docker]# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don‘t have a Docker ID, head over to https://hub.docker.com to create one.
Username: mike0405
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
(3)然后把我们登录的凭据存入了以下位置。
[[email protected] .docker]# pwd
/root/.docker
[[email protected] .docker]# cat config.json
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "bWlrZTA0MDU6emFuZzA0MDVaQU5H"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.05.0-ce (linux)"
}
(4)制作镜像并上传
[[email protected] .docker]# docker tag flask mike0405/flask
[[email protected] .docker]# docker push mike0405/flask
The push refers to repository [docker.io/mike0405/flask]
7ac180ee56ec: Pushed
7ac2d207ee3f: Pushed
c0cb3173d025: Pushed
d2e086cfb9ca: Pushed
7861eaf542d8: Pushed
6948ed269722: Pushed
4622c8e1bdc0: Pushed
b33859b66bfd: Pushed
14fa4a9494bf: Pushed
0c3819952093: Pushed
05b0f7f2a817: Pushed
latest: digest: sha256:bf314bbc4e3fa98f80cb964e750d58e1f47b361525fe780b1a3803eb5099e2ef size: 2619
(5)从以下图中,可以看到步骤4的上传已经成功了。
(6)镜像搜索使用search选项
例:[[email protected] .docker]# docker search postgres
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
postgres The PostgreSQL object-relational database sy… 4979 [OK]
sameersbn/postgresql 130 [OK]
paintedfox/postgresql A docker image for running Postgresql. 77 [OK]
orchardup/postgresql https://github.com/orchardup/docker-postgres… 44 [OK]
kiasaki/alpine-postgres PostgreSQL docker image based on Alpine Linux 41 [OK]
centos/postgresql-96-centos7 PostgreSQL is an advanced Object-Relational … 19
bitnami/postgresql Bitnami PostgreSQL Docker Image 18 [OK]
begriffs/postgrest Moved to https://hub.docker.com/r/postgrest/… 16 [OK]
centos/postgresql-94-centos7 PostgreSQL is an advanced Object-Relational … 15
crunchydata/crunchy-postgres Crunchy PostgreSQL is an open source, unmodi… 11
wrouesnel/postgres_exporter Postgres metrics exporter for Prometheus. 8
clkao/postgres-plv8 Docker image for running PLV8 1.4 on Postgre… 7 [OK]
以上是关于Docker 镜像文件的上传的主要内容,如果未能解决你的问题,请参考以下文章
Docker教程-9-构建镜像并上传到DockerHub仓库
Docker教程-9-构建镜像并上传到DockerHub仓库