Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containers.conf: add compose fields #1571

Merged
merged 4 commits into from
Jul 24, 2023

Conversation

vrothberg
Copy link
Member

Please refer to the individual commits and Podman PR containers/podman#19297 to review the plumbing.

@vrothberg
Copy link
Member Author

@ashley-cui @Luap99 @rhatdan @benoitf PTAL

Seen in `make validate`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Mention it in the man page.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Emit logs on each invocation of the compose command indicating that an
external compose provider is being executed.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
pkg/config/default_freebsd.go Outdated Show resolved Hide resolved
pkg/config/default_linux.go Outdated Show resolved Hide resolved

func getDefaultComposeProviders() []string {
// Rely on os.LookPath to do the trick on Windows.
return []string{"docker-compose", "podman-compose"}
Copy link
Member

Choose a reason for hiding this comment

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

did you check where the docker-compose plugin is installed on windows? cc @benoitf

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I asked others to test on Windows.

pkg/config/default_common.go Outdated Show resolved Hide resolved

Enforce using docker.io for completing short names in Podman's compatibility
REST API. Note that this will ignore unqualified-search-registries and
short-name aliases defined in containers-registries.conf(5).
Copy link
Member

Choose a reason for hiding this comment

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

Did not know this ignored short-names, not so crazy about this, but I guess this is what we got.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was a deliberate decision since we'd otherwise not be Docker compatible.

docs/containers.conf.5.md Outdated Show resolved Hide resolved
// ComposeProviders specifies one or more external providers for the
// compose command. The first found provider is used for execution.
// Can be an absolute and relative path or a (file) name. Make sure to
// expand the return items via `os.ExpandEnv`.
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a builtin function
ComposeProvidersExpanded()

Which does the os.ExpandEnv for the caller?

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered it but there is only one caller which will call os.ExpandEnv on demand, so I thought it's OK.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

code LGTM, I cannot really comment on the default path locations but we can tweak them later if needed

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Specify one or more external providers for the compose command.  The
first found provider is used for execution. Can be an absolute path or a
(file) name. Relative names are invalid.  File names are evaluated via
$PATH look ups.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@vrothberg
Copy link
Member Author

@ashley-cui @rhatdan PTanotherL

@ashley-cui
Copy link
Member

Darwin paths LGTM

@rhatdan
Copy link
Member

rhatdan commented Jul 24, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 24, 2023
@openshift-merge-robot openshift-merge-robot merged commit 2966c70 into containers:main Jul 24, 2023
7 checks passed
@vrothberg vrothberg deleted the RUN-1865 branch July 24, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants