Docker 镜像文件的上传
制作一个去镜像,然后把它上传到hub.docker.com上去(1)登入到以下网址,注册一个帐户名称
https://hub.docker.com/
(2)在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)然后把我们登录的凭据存入了以下位置。
# pwd
/root/.docker
# cat config.json
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "bWlrZTA0MDU6emFuZzA0MDVaQU5H"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.05.0-ce (linux)"
}
(4)制作镜像并上传
# docker tag flask mike0405/flask
# docker push mike0405/flask
The push refers to repository
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的上传已经成功了。
http://i2.运维网.com/images/blog/201805/27/3454e507eaa4bc5cad87d88fd8fadfe5.png
(6)镜像搜索使用search选项
例:# docker search postgres
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
postgres The PostgreSQL object-relational database sy… 4979
sameersbn/postgresql 130
paintedfox/postgresql A docker image for running Postgresql. 77
orchardup/postgresql https://github.com/orchardup/docker-postgres… 44
kiasaki/alpine-postgres PostgreSQL docker image based on Alpine Linux 41
centos/postgresql-96-centos7 PostgreSQL is an advanced Object-Relational … 19
bitnami/postgresql Bitnami PostgreSQL Docker Image 18
begriffs/postgrest Moved to https://hub.docker.com/r/postgrest/… 16
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
页:
[1]