Via command
Run following command:
docker exec -it dokemon docker login {URL} -u {USERNAME}
# OR
docker exec -it dokemon-agent docker login {URL} -u {USERNAME}
Enter Password:
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
Via volume mapping
Add config.json mapping to compose.yml:
volumes:
- /path/to/.docker/config.json:/root/.docker/config.json
The config.json located in home path by default (e.g., /home/ubuntu/.docker/config.json)
Via command
Run following command:
Enter Password:
Via volume mapping
Add
config.jsonmapping tocompose.yml:The
config.jsonlocated in home path by default (e.g.,/home/ubuntu/.docker/config.json)