mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 23:02:16 +00:00
Use API also when pulling from helpers used in client
This commit is contained in:
@@ -62,11 +62,6 @@ func NewUnpackCommand() *cobra.Command {
|
||||
identity, _ := cmd.Flags().GetString("auth-identity-token")
|
||||
registryToken, _ := cmd.Flags().GetString("auth-registry-token")
|
||||
|
||||
temp, err := util.DefaultContext.Config.GetSystem().TempDir("contentstore")
|
||||
if err != nil {
|
||||
util.DefaultContext.Fatal("Cannot create a tempdir", err.Error())
|
||||
}
|
||||
|
||||
util.DefaultContext.Info("Downloading", image, "to", destination)
|
||||
auth := &types.AuthConfig{
|
||||
Username: user,
|
||||
@@ -77,7 +72,7 @@ func NewUnpackCommand() *cobra.Command {
|
||||
RegistryToken: registryToken,
|
||||
}
|
||||
|
||||
info, err := docker.DownloadAndExtractDockerImage(temp, image, destination, auth, verify)
|
||||
info, err := docker.DownloadAndExtractDockerImage(util.DefaultContext, image, destination, auth, verify)
|
||||
if err != nil {
|
||||
util.DefaultContext.Error(err.Error())
|
||||
os.Exit(1)
|
||||
|
Reference in New Issue
Block a user