docker login file ~/.docker/config.json

Note  

1. Avoid docker login,  you can copy ~/.docker/config.json from other machine to avoid login fail!!

2.  "auth": "XXXXXXXXX" is base64

  Try 

$echo -n 'lakeXXXXker:XX@number' | base64
bGXXXXXXXXXXXXXXXXxNQ==

1. Windows  


$ uname -a
MINGW64_NT-10.0 Win10 2.11.2(0.329/5/3) 2018-11-10 14:38 x86_64 Msys

Administrator@Win10 MINGW64 ~
$ docker version
Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24302
 Built: Fri Mar 23 08:31:36 2018
 OS/Arch:       windows/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:14:54 2018
  OS/Arch:      linux/amd64
  Experimental: false

Administrator@Win10 MINGW64 ~
Administrator@Win10 MINGW64  
$ 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: lakehudocker
Password:
Login Succeeded
 
Administrator@Win10 MINGW64 ~
$ ls -l  ~/.docker/
total 1
-rw-r--r-- 1 Administrator 197121 178 1月  27 21:49 config.json
drwxr-xr-x 1 Administrator 197121   0 8月  13 12:52 machine/

Administrator@Win10 MINGW64 ~
$ cat    .docker/config.json
{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "XXXXXXXXX"
                }
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/18.03.0-ce (windows)"
        }
}
Administrator@Win10 MINGW64 ~
$
 


$ docker pull lakehudocker/hello ======>ARM64 elf
Using default tag: latest
latest: Pulling from lakehudocker/hello
f0a199eae365: Pull complete
Digest: sha256:9a128505bf51003c9539a462e6b6b28939ac29c85fcac3bc901ee28f194c6722
Status: Downloaded newer image for lakehudocker/hello:latest

Administrator@Win10 MINGW64 ~
$  docker image ls
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
lakehudocker/hello   latest              92c78963cad5        6 weeks ago         913kB   ======>ARM64 elf
alpine               latest              965ea09ff2eb        3 months ago        5.55MB
hello-world          latest              fce289e99eb9        13 months ago       1.84kB

Administrator@Win10 MINGW64 ~
$ docker run  lakehudocker/hello
Hello


2. ARMv7/LinuxDebian8/AllWinnerT3_CortextA7


root@Debian:~# docker version
Client:
 Version:           18.06.3-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        d7080c1
 Built:             Wed Feb 20 02:48:01 2019
 OS/Arch:           linux/arm
 Experimental:      false

Server:
 Engine:
  Version:          18.06.3-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       d7080c1
  Built:            Wed Feb 20 02:43:39 2019
  OS/Arch:          linux/arm
  Experimental:     false
root@Debian:~# cat /etc/issue
Debian GNU/Linux 8 \n \l

root@Debian:~# uname -a
Linux Debian 4.9.118 #8 SMP Mon Jan 27 17:28:37 CST 2020 armv7l GNU/Linux
root@Debian:~# cat /proc/version
Linux version 4.9.118 (lake@lake-Latitude-5491) (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05) ) #8 SMP Mon Jan 27 17:28:37 CST 2020
root@Debian:~#

root@Debian:~# 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: lakehudocker
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
root@Debian:~# ls -la
total 28
drwx------  3 root root 4096 Jan 27 13:51 .
drwxr-xr-x 22 root root 4096 Jun  3  2019 ..
-rw-------  1 root root 2121 Jan 27 11:59 .bash_history
-rw-r--r--  1 root root  570 Jan 31  2010 .bashrc
drwx------  2 root root 4096 Jan 27 13:51 .docker
-rw-r--r--  1 root root  140 Nov 19  2007 .profile
-rw-------  1 root root 1426 Apr 26  2019 .viminfo
root@Debian:~# ls -l .docker/
total 4
-rw------- 1 root root 176 Jan 27 13:51 config.json
root@Debian:~# cat .docker/config.json
{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "XXXXXXXXX"
                }
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/18.06.3-ce (linux)"
        }
}root@Debian:~#

# Note ARMv7/CortextA7 linux can't run ARM64 docker image (lakehudocker/hello)

root@Debian:~# docker run  hello-world    ---->> Docker official arm32v7 image: hello-world   
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
4ee5c797bcd7: Pull complete
Digest: sha256:9572f7cdcee8591948c2963463447a53466950b3fc15a247fcad1917ca215a2f
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm32v7)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

root@Debian:~#
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值