MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / Run

Method Run

cli/pkg/common/docker.go:85–94  ·  view source on GitHub ↗
(ctx context.Context, name string, image string, cmd []string, volumes map[string]struct{}, ports nat.PortSet)

Source from the content-addressed store, hash-verified

83}
84
85func (d Docker) Run(ctx context.Context, name string, image string, cmd []string, volumes map[string]struct{}, ports nat.PortSet) error {
86 resp, err := d.client.ContainerCreate(ctx, &container.Config{Image: image, Volumes: volumes, ExposedPorts: ports, Cmd: cmd}, nil, nil, nil, name)
87 if err != nil {
88 return err
89 }
90 if err = d.client.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil {
91 return err
92 }
93 return nil
94}
95
96func (d Docker) Copy(ctx context.Context, file string, dest string, container string) error {
97 srcPath := file

Callers 15

ExecKubectlCommandMethod · 0.80
checkAndInstallKubectlFunction · 0.80
RealtimeMethod · 0.80
CheckLocalEnvFunction · 0.80
CheckLocalGitEnvFunction · 0.80
SshRemoteRunCommandFunction · 0.80
TestSecretSimpleFunction · 0.80
TestImageFunction · 0.80

Calls

no outgoing calls

Tested by 5

TestSecretSimpleFunction · 0.64
TestImageFunction · 0.64
TestPortSimpleFunction · 0.64
TestVolumeMapSimpleFunction · 0.64