Allow authenticated pull and push of docker images#13569
Allow authenticated pull and push of docker images#13569nik-localstack merged 4 commits intomainfrom
Conversation
S3 Image Test Results (AMD64 / ARM64) 2 files 2 suites 7m 57s ⏱️ Results for commit f20dd8c. ♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 34m 7s ⏱️ Results for commit f20dd8c. ♻️ This comment has been updated with latest results. |
b99e783 to
096c7a7
Compare
0a6463b to
3523a00
Compare
32422d7 to
ee46e6b
Compare
ee46e6b to
3aeca37
Compare
dfangl
left a comment
There was a problem hiding this comment.
LGTM, nice addition! Love the usage of auth_config in the SDK client instead of just a login, it is a shame that the docker CLI does not expose this
| log_config=container_config.log_config, | ||
| cpu_shares=container_config.cpu_shares, | ||
| mem_limit=container_config.mem_limit, | ||
| auth_config=container_config.auth_config, |
There was a problem hiding this comment.
This should also be present in run_container_from_config and maybe generally run_container then, right?
There was a problem hiding this comment.
Good point, I added it there and added tests for these 4 methods
| docker_client.stop_container(registry_name) | ||
| docker_client.remove_container(registry_name) | ||
| except Exception: | ||
| pass |
There was a problem hiding this comment.
Could we maybe log this exception, should it happen? This can help spotting cleanup errors, for example.
3aeca37 to
dd5f268
Compare
dd5f268 to
f20dd8c
Compare
Motivation
In order to support repository credentials for ECS tasks, we should be able to push and pull images using authentication.
Docker SDK allows extra parameters to achieve this, while for docker cli we use the
loginbefore pushing or pulling.Changes
auth_configparameter inpush_imageandpull_imagemethodsTests
Related
Resolves UNC-143