Add darwin support for remote-client

Add the ability to cross-compile podman remote for OSX.

Also, add image exists and tag to remote-client.

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-01-10 12:15:33 -06:00
parent 28c35cab87
commit 43c6da22b9
14 changed files with 126 additions and 42 deletions

View File

@@ -120,7 +120,7 @@ func main() {
os.Exit(1)
}
args := c.Args()
if args.Present() {
if args.Present() && rootless.IsRootless() {
if _, notRequireRootless := cmdsNotRequiringRootless[args.First()]; !notRequireRootless {
became, ret, err := rootless.BecomeRootInUserNS()
if err != nil {
@@ -265,11 +265,10 @@ func main() {
Usage: "output logging information to syslog as well as the console",
},
}
if _, err := os.Stat("/etc/containers/registries.conf"); err != nil {
if os.IsNotExist(err) {
logrus.Warn("unable to find /etc/containers/registries.conf. some podman (image shortnames) commands may be limited")
}
}
// Check if /etc/containers/registries.conf exists when running in
// in a local environment.
CheckForRegistries()
if err := app.Run(os.Args); err != nil {
if debug {
logrus.Errorf(err.Error())