@@ -47,11 +47,11 @@ var (
4747 }
4848)
4949
50- // WithVmLocalImageConfig configures a spec with the content of the image's config.
50+ // WithVMLocalImageConfig configures a spec with the content of the image's config.
5151// It is similar to containerd's oci.WithImageConfig except that it does not access
5252// the image's rootfs on the host. Instead, it configures what it can on the host and
5353// passes information to the agent running in the VM to inspect the image's rootfs.
54- func WithVmLocalImageConfig (image containerd.Image ) oci.SpecOpts {
54+ func WithVMLocalImageConfig (image containerd.Image ) oci.SpecOpts {
5555 return func (ctx context.Context , client oci.Client , container * containers.Container , spec * oci.Spec ) error {
5656 ic , err := image .Config (ctx )
5757 if err != nil {
@@ -85,25 +85,26 @@ func WithVmLocalImageConfig(image containerd.Image) oci.SpecOpts {
8585 }
8686 spec .Process .Env = replaceOrAppendEnvValues (defaults , spec .Process .Env )
8787 cmd := config .Cmd
88- spec .Process .Args = append (config .Entrypoint , cmd ... )
88+ spec .Process .Args = append ([]string {}, config .Entrypoint ... )
89+ spec .Process .Args = append (spec .Process .Args , cmd ... )
8990
9091 cwd := config .WorkingDir
9192 if cwd == "" {
9293 cwd = "/"
9394 }
9495 spec .Process .Cwd = cwd
9596 if config .User != "" {
96- WithVmLocalUser (config .User )(ctx , client , container , spec )
97+ WithVMLocalUser (config .User )(ctx , client , container , spec )
9798 }
9899 return nil
99100 }
100101}
101102
102- // WithVmLocalUser configures the user of the spec.
103+ // WithVMLocalUser configures the user of the spec.
103104// It is similar to oci.WithUser except that it doesn't map
104105// username -> uid or group name -> gid. It passes the user to the
105106// agent running inside the VM to do that mapping.
106- func WithVmLocalUser (user string ) oci.SpecOpts {
107+ func WithVMLocalUser (user string ) oci.SpecOpts {
107108 return func (ctx context.Context , client oci.Client , container * containers.Container , spec * oci.Spec ) error {
108109 // This is technically an LCOW specific field, but we piggy back
109110 // to get the string user into the VM where will will do the uid/gid mapping
0 commit comments