From 6b89b26652828afe627a378401561646a3de316c Mon Sep 17 00:00:00 2001 From: Zhang Zhanpeng Date: Tue, 17 May 2022 21:29:28 +0800 Subject: [PATCH] support cmd and entrypoint --- object/utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/object/utils.go b/object/utils.go index b3fbf24..35d5875 100644 --- a/object/utils.go +++ b/object/utils.go @@ -46,6 +46,8 @@ type RunDescriptionEntity struct { NetworkList []string `yaml:"network_list"` PublishList []string `yaml:"publish_list"` VolumeList []string `yaml:"volume_list"` + Cmd []string `yaml:"cmd"` + Entrypoint []string `yaml:"entrypoint"` } type KetherObjectEntity struct { @@ -103,6 +105,8 @@ func (ketherObjectEntity *KetherObjectEntity) GetKetherObject() *KetherObject { NetworkList: ketherObjectEntity.Requirement.NetworkList, PublishList: ketherObjectEntity.Requirement.PublishList, VolumeList: ketherObjectEntity.Requirement.VolumeList, + Cmd: ketherObjectEntity.Requirement.Cmd, + Entrypoint: ketherObjectEntity.Requirement.Entrypoint, }, } } @@ -222,6 +226,8 @@ func (ketherObject *KetherObject) GetContainerAndHostConfig() (*container.Config containerConfig := &container.Config{ Image: ketherObject.GetImageName(), ExposedPorts: exposedPorts, + Cmd: ketherObject.Requirement.Cmd, + Entrypoint: ketherObject.Requirement.Entrypoint, } hostConfig := &container.HostConfig{ PortBindings: portBindings,