|
5 | 5 | import com.github.dockerjava.api.model.AuthConfig; |
6 | 6 | import com.github.dockerjava.api.model.Bind; |
7 | 7 | import com.github.dockerjava.api.model.Capability; |
| 8 | +import com.github.dockerjava.api.model.Device; |
8 | 9 | import com.github.dockerjava.api.model.ExposedPort; |
9 | 10 | import com.github.dockerjava.api.model.HealthCheck; |
10 | 11 | import com.github.dockerjava.api.model.HostConfig; |
11 | 12 | import com.github.dockerjava.api.model.Link; |
| 13 | +import com.github.dockerjava.api.model.LogConfig; |
| 14 | +import com.github.dockerjava.api.model.LxcConf; |
12 | 15 | import com.github.dockerjava.api.model.PortBinding; |
13 | 16 | import com.github.dockerjava.api.model.Ports; |
| 17 | +import com.github.dockerjava.api.model.RestartPolicy; |
| 18 | +import com.github.dockerjava.api.model.Ulimit; |
14 | 19 | import com.github.dockerjava.api.model.Volume; |
15 | 20 | import com.github.dockerjava.api.model.VolumesFrom; |
16 | 21 |
|
@@ -366,6 +371,160 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons |
366 | 371 |
|
367 | 372 | CreateContainerCmd withHostConfig(HostConfig hostConfig); |
368 | 373 |
|
| 374 | + // The following methods are deprecated and should be set on {@link #getHostConfig()} instead. |
| 375 | + // TODO remove in the next big release |
| 376 | + |
| 377 | + @Deprecated |
| 378 | + @CheckForNull |
| 379 | + Integer getBlkioWeight(); |
| 380 | + |
| 381 | + @CheckForNull |
| 382 | + @Deprecated |
| 383 | + String getCgroupParent(); |
| 384 | + |
| 385 | + @Deprecated |
| 386 | + @CheckForNull |
| 387 | + Integer getCpuPeriod(); |
| 388 | + |
| 389 | + @Deprecated |
| 390 | + @CheckForNull |
| 391 | + Integer getCpuShares(); |
| 392 | + |
| 393 | + @Deprecated |
| 394 | + @CheckForNull |
| 395 | + String getCpusetCpus(); |
| 396 | + |
| 397 | + @Deprecated |
| 398 | + @CheckForNull |
| 399 | + String getCpusetMems(); |
| 400 | + |
| 401 | + @Deprecated |
| 402 | + @CheckForNull |
| 403 | + Device[] getDevices(); |
| 404 | + |
| 405 | + @Deprecated |
| 406 | + @CheckForNull |
| 407 | + String[] getDns(); |
| 408 | + |
| 409 | + @Deprecated |
| 410 | + @CheckForNull |
| 411 | + String[] getDnsSearch(); |
| 412 | + |
| 413 | + @Deprecated |
| 414 | + @CheckForNull |
| 415 | + LogConfig getLogConfig(); |
| 416 | + |
| 417 | + @Deprecated |
| 418 | + @CheckForNull |
| 419 | + LxcConf[] getLxcConf(); |
| 420 | + |
| 421 | + @Deprecated |
| 422 | + @CheckForNull |
| 423 | + Boolean getOomKillDisable(); |
| 424 | + |
| 425 | + @Deprecated |
| 426 | + @CheckForNull |
| 427 | + String getPidMode(); |
| 428 | + |
| 429 | + @Deprecated |
| 430 | + @CheckForNull |
| 431 | + Boolean getReadonlyRootfs(); |
| 432 | + |
| 433 | + @Deprecated |
| 434 | + @CheckForNull |
| 435 | + RestartPolicy getRestartPolicy(); |
| 436 | + |
| 437 | + @Deprecated |
| 438 | + @CheckForNull |
| 439 | + Ulimit[] getUlimits(); |
| 440 | + |
| 441 | + @Deprecated |
| 442 | + CreateContainerCmd withBlkioWeight(Integer blkioWeight); |
| 443 | + |
| 444 | + @Deprecated |
| 445 | + CreateContainerCmd withCgroupParent(String cgroupParent); |
| 446 | + |
| 447 | + @Deprecated |
| 448 | + CreateContainerCmd withContainerIDFile(String containerIDFile); |
| 449 | + |
| 450 | + @Deprecated |
| 451 | + CreateContainerCmd withCpuPeriod(Integer cpuPeriod); |
| 452 | + |
| 453 | + @Deprecated |
| 454 | + CreateContainerCmd withCpuShares(Integer cpuShares); |
| 455 | + |
| 456 | + @Deprecated |
| 457 | + CreateContainerCmd withCpusetCpus(String cpusetCpus); |
| 458 | + |
| 459 | + @Deprecated |
| 460 | + CreateContainerCmd withCpusetMems(String cpusetMems); |
| 461 | + |
| 462 | + @Deprecated |
| 463 | + CreateContainerCmd withDevices(Device... devices); |
| 464 | + |
| 465 | + /** |
| 466 | + * Add host devices to the container |
| 467 | + */ |
| 468 | + @Deprecated |
| 469 | + CreateContainerCmd withDevices(List<Device> devices); |
| 470 | + |
| 471 | + /** |
| 472 | + * Set custom DNS servers |
| 473 | + */ |
| 474 | + @Deprecated |
| 475 | + CreateContainerCmd withDns(String... dns); |
| 476 | + |
| 477 | + /** |
| 478 | + * Set custom DNS servers |
| 479 | + */ |
| 480 | + @Deprecated |
| 481 | + CreateContainerCmd withDns(List<String> dns); |
| 482 | + |
| 483 | + /** |
| 484 | + * Set custom DNS search domains |
| 485 | + */ |
| 486 | + @Deprecated |
| 487 | + CreateContainerCmd withDnsSearch(String... dnsSearch); |
| 488 | + |
| 489 | + /** |
| 490 | + * Set custom DNS search domains |
| 491 | + */ |
| 492 | + @Deprecated |
| 493 | + CreateContainerCmd withDnsSearch(List<String> dnsSearch); |
| 494 | + |
| 495 | + @Deprecated |
| 496 | + CreateContainerCmd withLogConfig(LogConfig logConfig); |
| 497 | + |
| 498 | + @Deprecated |
| 499 | + CreateContainerCmd withLxcConf(LxcConf... lxcConf); |
| 500 | + |
| 501 | + @Deprecated |
| 502 | + CreateContainerCmd withLxcConf(List<LxcConf> lxcConf); |
| 503 | + |
| 504 | + @Deprecated |
| 505 | + CreateContainerCmd withOomKillDisable(Boolean oomKillDisable); |
| 506 | + |
| 507 | + /** |
| 508 | + * Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace inside the container |
| 509 | + */ |
| 510 | + @Deprecated |
| 511 | + CreateContainerCmd withPidMode(String pidMode); |
| 512 | + |
| 513 | + @Deprecated |
| 514 | + CreateContainerCmd withReadonlyRootfs(Boolean readonlyRootfs); |
| 515 | + |
| 516 | + /** |
| 517 | + * Set custom {@link RestartPolicy} for the container. Defaults to {@link RestartPolicy#noRestart()} |
| 518 | + */ |
| 519 | + @Deprecated |
| 520 | + CreateContainerCmd withRestartPolicy(RestartPolicy restartPolicy); |
| 521 | + |
| 522 | + @Deprecated |
| 523 | + CreateContainerCmd withUlimits(Ulimit... ulimits); |
| 524 | + |
| 525 | + @Deprecated |
| 526 | + CreateContainerCmd withUlimits(List<Ulimit> ulimits); |
| 527 | + |
369 | 528 | /** |
370 | 529 | * @throws NotFoundException No such container |
371 | 530 | * @throws ConflictException Named container already exists |
|
0 commit comments