The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/178
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Fix use of docker-http source. With new API an object DownloadOpts is mandatory.
From ac2ecca2215d477f88f253f34869532a5448e7b5 Mon Sep 17 00:00:00 2001 From: Daniele Rondina <[email protected]> Date: Mon, 20 May 2019 17:20:22 +0200 Subject: [PATCH] sources/docker-http: Fix SIGSEGV Signed-off-by: Daniele Rondina <[email protected]> --- sources/docker.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sources/docker.go b/sources/docker.go index 0370e95..da120a4 100644 --- a/sources/docker.go +++ b/sources/docker.go @@ -1,6 +1,7 @@ package sources import ( + "os" "path/filepath" dcapi "github.com/mudler/docker-companion/api" @@ -23,7 +24,9 @@ func (d *DockerHTTP) Run(definition shared.Definition, rootfsDir string) error { return err } - // NOTE: For now we use only docker official server but we can - // add a new parameter on DefinitionSource struct. - return dcapi.DownloadAndUnpackImage(definition.Source.URL, absRootfsDir, nil) + // If DOCKER_REGISTRY_BASE is not set it's used default https://registry-1.docker.io + return dcapi.DownloadAndUnpackImage(definition.Source.URL, absRootfsDir, &dcapi.DownloadOpts{ + RegistryBase: os.Getenv("DOCKER_REGISTRY_BASE"), + KeepLayers: false, + }) }
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
