@@ -143,23 +143,6 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
143143 }
144144 }
145145
146- // Annotations: TODO - available in nerdctl 2.0
147- // Annotations are passed in as a map of strings,
148- // but nerdctl expects an array of strings with format [annotations1=VALUE1, annotations2=VALUE2, ...].
149- // annotations := []string{}
150- // if req.HostConfig.Annotations != nil {
151- // for key, val := range req.HostConfig.Annotations {
152- // annotations = append(annotations, fmt.Sprintf("%s=%s", key, val))
153- // }
154- // }
155-
156- ulimits := []string {}
157- if req .HostConfig .Ulimits != nil {
158- for _ , ulimit := range req .HostConfig .Ulimits {
159- ulimits = append (ulimits , ulimit .String ())
160- }
161- }
162-
163146 // devices:
164147 // devices are passed in as a map of DeviceMapping,
165148 // but nerdctl expects an array of strings with format [PathOnHost1:PathInContainer1:CgroupPermissions1, PathOnHost2:PathInContainer2:CgroupPermissions2, ...].
@@ -250,11 +233,6 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
250233 securityOpt = req .HostConfig .SecurityOpt
251234 }
252235
253- pidLimit := int64 (- 1 )
254- if req .HostConfig .PidsLimit > 0 {
255- pidLimit = req .HostConfig .PidsLimit
256- }
257-
258236 cgroupnsMode := defaults .CgroupnsMode ()
259237 if req .HostConfig .CgroupnsMode .Valid () {
260238 cgroupnsMode = string (req .HostConfig .CgroupnsMode )
@@ -305,7 +283,6 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
305283 CPUSetMems : req .HostConfig .CPUSetMems , // CpusetMems 0-2, 0,1
306284 IPC : req .HostConfig .IpcMode , // IPC namespace to use
307285 ShmSize : shmSize , // ShmSize set the size of /dev/shm
308- Ulimit : ulimits , // List of ulimits to be set in the container
309286 Device : devices , // Device specifies add a host device to the container
310287 // #endregion
311288
0 commit comments