Skip to content

Conversation

marvin659
Copy link

Update Fn to support podman config location: /run/user//containers/auth.json.

In CloudShell OL8 environment, podman auth config is available but not docker config so this change is necessary so that CloudShell user does not need to set the FN_DOCKER_AUTH variable.

If the file is found, it will take precedence over the docker config. If it is not found or not valid, Fn will fallback to docker config.

}
auths, err := docker.NewAuthConfigurations(strings.NewReader(authJson))
if err != nil {
logrus.WithError(err).Infof("Failed to parse %s podman config. Fall back to docker config.", authJson)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than log from here, return an error that can be logged at a higher level if necessary. It's not for this method to know that there will be a fallback to docker config, this method is just meant to get the config for Podman.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Could you please review again?

@fnproject fnproject deleted a comment from yufeifly May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants