Skip to content

Commit

Permalink
Add additional portMapping and restartPolicy options to docker extens…
Browse files Browse the repository at this point in the history
…ion options
  • Loading branch information
Rich Baird authored and Rich Baird committed Jun 16, 2022
1 parent eff08aa commit f37b842
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/cnab/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package cnab
import (
"encoding/json"

"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -38,6 +40,11 @@ type Docker struct {
CapAdd []string `json:"capadd,omitempty"`
// CapDrop represents capabilities to exclude from the container kernel
CapDrop []string `json:"capdrop,omitempty"`
// Ports to bind between the host and the container
PortBindings []nat.PortMap `json:"portBindings,omitempty"`
// Restart policy to be used for the container
// This may be useful in some rare cases
RestartPolicy container.RestartPolicy `json:"restartPolicy"`
}

// DockerExtensionReader is a Reader for the DockerExtension,
Expand Down

0 comments on commit f37b842

Please sign in to comment.