Skip to content

Conversation

@nik-localstack
Copy link
Contributor

@nik-localstack nik-localstack commented Dec 29, 2025

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 login before pushing or pulling.

Changes

  • Adds support for auth_config parameter in push_image and pull_image methods

Tests

  • Tested manually against a private docker registry
  • Added integration tests to verify the behavior against a local registry

Related

Resolves UNC-143

@nik-localstack nik-localstack added this to the 4.13 milestone Dec 29, 2025
@nik-localstack nik-localstack self-assigned this Dec 29, 2025
@nik-localstack nik-localstack added area: docker Use Docker with LocalStack semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Dec 29, 2025
@github-actions
Copy link

github-actions bot commented Dec 29, 2025

S3 Image Test Results (AMD64 / ARM64)

    2 files      2 suites   7m 57s ⏱️
  552 tests   500 ✅  52 💤 0 ❌
1 104 runs  1 000 ✅ 104 💤 0 ❌

Results for commit f20dd8c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Test Results - Preflight, Unit

23 068 tests  +22   21 223 ✅ +22   6m 18s ⏱️ -31s
     1 suites ± 0    1 845 💤 ± 0 
     1 files   ± 0        0 ❌ ± 0 

Results for commit f20dd8c. ± Comparison against base commit 7aa1faf.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   2m 57s ⏱️ -4s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f20dd8c. ± Comparison against base commit 7aa1faf.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 34m 7s ⏱️
5 583 tests 5 015 ✅ 568 💤 0 ❌
5 589 runs  5 015 ✅ 574 💤 0 ❌

Results for commit f20dd8c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 54m 10s ⏱️ - 1m 38s
5 162 tests ±0  4 764 ✅ ±0  398 💤 ±0  0 ❌ ±0 
5 164 runs  ±0  4 764 ✅ ±0  400 💤 ±0  0 ❌ ±0 

Results for commit f20dd8c. ± Comparison against base commit 7aa1faf.

♻️ This comment has been updated with latest results.

@nik-localstack nik-localstack force-pushed the ecs/support-repository-credentials-2 branch 2 times, most recently from b99e783 to 096c7a7 Compare December 31, 2025 10:37
@nik-localstack nik-localstack changed the title Allow authenticated pull of docker images Allow authenticated pull and push of docker images Dec 31, 2025
@nik-localstack nik-localstack force-pushed the ecs/support-repository-credentials-2 branch 5 times, most recently from 0a6463b to 3523a00 Compare January 5, 2026 10:25
@nik-localstack nik-localstack marked this pull request as ready for review January 5, 2026 12:19
@nik-localstack nik-localstack requested a review from simonrw January 5, 2026 12:19
@nik-localstack nik-localstack force-pushed the ecs/support-repository-credentials-2 branch from 32422d7 to ee46e6b Compare January 8, 2026 08:11
@nik-localstack nik-localstack requested a review from a team January 8, 2026 10:41
@nik-localstack nik-localstack force-pushed the ecs/support-repository-credentials-2 branch from ee46e6b to 3aeca37 Compare January 9, 2026 16:02
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be present in run_container_from_config and maybe generally run_container then, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe log this exception, should it happen? This can help spotting cleanup errors, for example.

@nik-localstack nik-localstack force-pushed the ecs/support-repository-credentials-2 branch from 3aeca37 to dd5f268 Compare January 12, 2026 15:14
@nik-localstack nik-localstack force-pushed the ecs/support-repository-credentials-2 branch from dd5f268 to f20dd8c Compare January 12, 2026 15:26
@nik-localstack nik-localstack merged commit e1822b3 into main Jan 12, 2026
49 checks passed
@nik-localstack nik-localstack deleted the ecs/support-repository-credentials-2 branch January 12, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docker Use Docker with LocalStack docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants