diff --git a/save.libsonnet b/save.libsonnet index 05e5689..c6f157a 100644 --- a/save.libsonnet +++ b/save.libsonnet @@ -40,6 +40,7 @@ function(config) 'registry_domain', 'registry_port', 'registry_password', + 'destination_registry' ], script +: [ login, @@ -50,12 +51,12 @@ function(config) out: std.strReplace(def.save, '/', '_'), } ), - 'echo "docker load %(out)s.tar" >> /%(root)s/.images/%(name)s/load.sh' % ( + 'echo "docker load < %(out)s.tar" >> /%(root)s/.images/%(name)s/load.sh' % ( config + { out: std.strReplace(def.save, '/', '_'), } ), - 'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s /%(root)s/DOLLAR1/%(pull)s" >> /%(root)s/.images/%(name)s/load.sh' % ( + 'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s $${DESTINATION_REGISTRY}/%(root)s/%(name)s/%(pull)s" >> /%(root)s/.images/%(name)s/load.sh' % ( config + { pull: def.save, @@ -77,6 +78,7 @@ function(config) 'registry_domain', 'registry_port', 'registry_password', + 'destination_registry', ], script +: [ login, @@ -93,7 +95,7 @@ function(config) out: std.strReplace(def, '/', '_'), } ), - 'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s /%(root)s/DOLLAR1/%(pull)s" >> /%(root)s/.images/%(name)s/built/load.sh' % ( + 'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s ${DESINATION_REGISTRY}/%(root)s/%(name)s/%(pull)s" >> /%(root)s/.images/%(name)s/built/load.sh' % ( config + { pull: def,