-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Podman Container Runtime (#1750)
Co-authored-by: Pritesh Arora <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Neel Dalsania <[email protected]>
- Loading branch information
1 parent
315d0bf
commit d42a292
Showing
29 changed files
with
1,908 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package runtimes | ||
|
||
const ( | ||
defaultTimeoutSeconds = 60 | ||
tickNum = 500 | ||
open = "open" | ||
timeoutErrMsg = "timed out waiting for docker" | ||
dockerOpenNotice = "We couldn't start the docker engine automatically. Please start it manually and try again." | ||
) | ||
|
||
// dockerEngine is the default implementation of DockerEngine. | ||
type dockerEngine struct{} | ||
|
||
func (d dockerEngine) IsRunning() (string, error) { | ||
checkDockerCmd := Command{ | ||
Command: docker, | ||
Args: []string{ | ||
"ps", | ||
}, | ||
} | ||
return checkDockerCmd.Execute() | ||
} | ||
|
||
func (d dockerEngine) Start() (string, error) { | ||
openDockerCmd := Command{ | ||
Command: open, | ||
Args: []string{ | ||
"-a", | ||
docker, | ||
}, | ||
} | ||
return openDockerCmd.Execute() | ||
} |
Oops, something went wrong.