@@ -462,6 +462,7 @@ func waitForRegistry(t testing.TB, pool *dockertest.Pool, resource *dockertest.R
462
462
func pushLocalImage (t testing.TB , pool * dockertest.Pool , host , remoteImage string ) RegistryImage {
463
463
t .Helper ()
464
464
465
+ const registryHost = "127.0.0.1"
465
466
name := filepath .Base (remoteImage )
466
467
repoTag := strings .Split (name , ":" )
467
468
tag := "latest"
@@ -483,12 +484,14 @@ func pushLocalImage(t testing.TB, pool *dockertest.Pool, host, remoteImage strin
483
484
require .NoError (t , err )
484
485
485
486
err = pool .Client .TagImage (remoteImage , docker.TagImageOptions {
486
- Repo : fmt .Sprintf ("%s:%s/%s" , "127.0.0.1" , port , name ),
487
+ Repo : fmt .Sprintf ("%s:%s/%s" , registryHost , port , name ),
487
488
Tag : tag ,
488
489
})
489
490
require .NoError (t , err )
490
491
491
- image := fmt .Sprintf ("%s:%s/%s:%s" , "127.0.0.1" , port , name , tag )
492
+ // Idk what to tell you but the pool.Client.PushImage
493
+ // function is bugged or I'm just dumb...
494
+ image := fmt .Sprintf ("%s:%s/%s:%s" , registryHost , port , name , tag )
492
495
cmd := exec .Command ("docker" , "push" , image )
493
496
cmd .Stderr = tw
494
497
cmd .Stdout = tw
0 commit comments