Skip to content

Commit

Permalink
feat(builder): add podman support
Browse files Browse the repository at this point in the history
  • Loading branch information
TaylorHere committed Nov 1, 2022
1 parent 3233cd6 commit 0913c11
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/app/context_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var CommandContextCreate = &cli.Command{
},
&cli.StringFlag{
Name: "builder",
Usage: "Builder to use (docker-container, kube-pod, tcp, unix)",
Usage: "Builder to use (docker-container, podman-container, kube-pod, tcp, unix)",
Value: string(types.BuilderTypeDocker),
},
&cli.StringFlag{
Expand Down
2 changes: 1 addition & 1 deletion pkg/buildkitd/buildkitd.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (c generalClient) Close() error {
// that can be used to connect to it.
func (c *generalClient) maybeStart(ctx context.Context,
runningTimeout, connectingTimeout time.Duration) (string, error) {
if c.driver == types.BuilderTypeDocker {
if c.driver == types.BuilderTypeDocker || c.driver == types.BuilderTypePodman {
dockerClient, err := docker.NewClient(ctx)
if err != nil {
return "", err
Expand Down
3 changes: 2 additions & 1 deletion pkg/home/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ func (m *generalManager) ContextCreate(ctx types.Context, use bool) error {
}
switch ctx.Builder {
case types.BuilderTypeDocker, types.BuilderTypeKubernetes,
types.BuilderTypeUNIXDomainSocket, types.BuilderTypeTCP:
types.BuilderTypeUNIXDomainSocket, types.BuilderTypeTCP,
types.BuilderTypePodman:
break
default:
return errors.New("unknown builder type")
Expand Down
1 change: 1 addition & 0 deletions pkg/types/envd.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ type BuilderType string

const (
BuilderTypeDocker BuilderType = "docker-container"
BuilderTypePodman BuilderType = "podman-container"
BuilderTypeKubernetes BuilderType = "kube-pod"
BuilderTypeTCP BuilderType = "tcp"
BuilderTypeUNIXDomainSocket BuilderType = "unix"
Expand Down

0 comments on commit 0913c11

Please sign in to comment.