mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
Merge pull request #16776 from Luap99/http-proxy
remote: allow --http-proxy for remote clients
This commit is contained in:
@ -621,7 +621,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
|
||||
|
||||
if registry.IsRemote() {
|
||||
_ = createFlags.MarkHidden("env-host")
|
||||
_ = createFlags.MarkHidden("http-proxy")
|
||||
_ = createFlags.MarkHidden(decryptionKeysFlagName)
|
||||
} else {
|
||||
createFlags.StringVar(
|
||||
|
||||
@ -168,16 +168,7 @@ func buildFlags(cmd *cobra.Command) {
|
||||
logrus.Errorf("Setting up build flags: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
// --http-proxy flag
|
||||
// containers.conf defaults to true but we want to force false by default for remote, since settings do not apply
|
||||
if registry.IsRemote() {
|
||||
flag = fromAndBudFlags.Lookup("http-proxy")
|
||||
buildOpts.HTTPProxy = false
|
||||
if err := flag.Value.Set("false"); err != nil {
|
||||
logrus.Errorf("Unable to set --https-proxy to %v: %v", false, err)
|
||||
}
|
||||
flag.DefValue = "false"
|
||||
}
|
||||
|
||||
flags.AddFlagSet(&fromAndBudFlags)
|
||||
// Add the completion functions
|
||||
fromAndBudFlagsCompletions := buildahCLI.GetFromAndBudFlagsCompletions()
|
||||
|
||||
Reference in New Issue
Block a user