Skip to content

Commit 81adbb0

Browse files
committed
chore: add support for MACAddress option
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 80af66f commit 81adbb0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

api/handlers/container/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
226226
DNSSearchDomains: req.HostConfig.DNSSearch, // Custom DNS search domains.
227227
PortMappings: portMappings,
228228
AddHost: req.HostConfig.ExtraHosts, // Extra hosts.
229+
MACAddress: req.MacAddress,
229230
}
230231

231232
ctx := namespaces.WithNamespace(r.Context(), h.Config.Namespace)

api/types/container_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type ContainerConfig struct {
4646
WorkingDir string `json:",omitempty"` // Current directory (PWD) in the command will be launched
4747
Entrypoint []string `json:",omitempty"` // Entrypoint to run when starting the container
4848
NetworkDisabled bool `json:",omitempty"` // Is network disabled
49-
// TODO: MacAddress string `json:",omitempty"` // Mac Address of the container
49+
MacAddress string `json:",omitempty"` // Mac Address of the container
5050
// TODO: OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile
5151
Labels map[string]string `json:",omitempty"` // List of labels set to this container
5252
StopSignal string `json:",omitempty"` // Signal to stop a container

0 commit comments

Comments
 (0)