Java Code Examples for com.spotify.docker.client.messages.ContainerConfig#Healthcheck

The following examples show how to use com.spotify.docker.client.messages.ContainerConfig#Healthcheck . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContainerSpec.java    From docker-client with Apache License 2.0 4 votes vote down vote up
/**
 * @since API 1.26
 */
@Nullable
@JsonProperty("Healthcheck")
public abstract ContainerConfig.Healthcheck healthcheck();
 
Example 2
Source File: ContainerSpec.java    From docker-client with Apache License 2.0 4 votes vote down vote up
@JsonCreator
static ContainerSpec create(
    @JsonProperty("Image") final String image,
    @JsonProperty("Labels") final Map<String, String> labels,
    @JsonProperty("Hostname") final String hostname,
    @JsonProperty("Command") final List<String> command,
    @JsonProperty("Args") final List<String> args,
    @JsonProperty("Env") final List<String> env,
    @JsonProperty("Dir") final String dir,
    @JsonProperty("User") final String user,
    @JsonProperty("Groups") final List<String> groups,
    @JsonProperty("TTY") final Boolean tty,
    @JsonProperty("Mounts") final List<Mount> mounts,
    @JsonProperty("StopGracePeriod") final Long stopGracePeriod,
    @JsonProperty("Healthcheck") final ContainerConfig.Healthcheck healthcheck,
    @JsonProperty("Hosts") final List<String> hosts,
    @JsonProperty("Secrets") final List<SecretBind> secrets,
    @JsonProperty("DNSConfig") final DnsConfig dnsConfig,
    @JsonProperty("Configs") final List<ConfigBind> configs) {
  final Builder builder = builder()
      .image(image)
      .hostname(hostname)
      .args(args)
      .env(env)
      .dir(dir)
      .user(user)
      .groups(groups)
      .tty(tty)
      .mounts(mounts)
      .stopGracePeriod(stopGracePeriod)
      .healthcheck(healthcheck)
      .hosts(hosts)
      .dnsConfig(dnsConfig)
      .command(command)
      .secrets(secrets)
      .configs(configs);

  if (labels != null) {
    builder.labels(labels);
  }

  return builder.build();
}