Fixed image
This commit is contained in:
parent
66bb59ff12
commit
142ec6aa98
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"default": [
|
||||||
|
{
|
||||||
|
"type": "insecureAcceptAnything"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transports": {
|
||||||
|
"docker-daemon": {
|
||||||
|
"": [
|
||||||
|
{
|
||||||
|
"type": "insecureAcceptAnything"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2018 Google LLC
|
Copyright 2018 Google LLC
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
|
@ -60,12 +63,11 @@ func PushImage(destImg string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
logrus.Infof("Pushing image to %s", destImg)
|
logrus.Infof("Pushing image to %s", destImg)
|
||||||
err = copy.Image(policyContext, destRef, srcRef, nil)
|
return copy.Image(policyContext, destRef, srcRef, nil)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPolicyContext() (*signature.PolicyContext, error) {
|
func getPolicyContext() (*signature.PolicyContext, error) {
|
||||||
policy, err := signature.NewPolicyFromFile(constants.PolicyJsonPath)
|
policy, err := signature.NewPolicyFromFile(constants.PolicyJSONPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Debugf("Error retrieving policy: %s", err)
|
logrus.Debugf("Error retrieving policy: %s", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue