Home / Function/ createWithPlatform() — spring-boot Function Reference

createWithPlatform() — spring-boot Function Reference

Architecture documentation for the createWithPlatform() function in DockerApiTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  8ccd9633_e994_9107_5bbb_051de8bbbf05["createWithPlatform()"]
  36161d41_cecd_3a21_efe0_efb976f2b18d["createWithPlatformAndUnknownApiVersionAttemptsCreate()"]
  36161d41_cecd_3a21_efe0_efb976f2b18d -->|calls| 8ccd9633_e994_9107_5bbb_051de8bbbf05
  274a52b3_b07b_ef2a_172f_1c8b25267451["withCommand()"]
  8ccd9633_e994_9107_5bbb_051de8bbbf05 -->|calls| 274a52b3_b07b_ef2a_172f_1c8b25267451
  ffedf588_7c32_be87_49b5_6f0bec311aa1["http()"]
  8ccd9633_e994_9107_5bbb_051de8bbbf05 -->|calls| ffedf588_7c32_be87_49b5_6f0bec311aa1
  88e4c755_21cd_03d2_7b78_c0a678363843["responseOf()"]
  8ccd9633_e994_9107_5bbb_051de8bbbf05 -->|calls| 88e4c755_21cd_03d2_7b78_c0a678363843
  759ca794_5cea_60bd_cef5_13bbbdbfd61c["toString()"]
  8ccd9633_e994_9107_5bbb_051de8bbbf05 -->|calls| 759ca794_5cea_60bd_cef5_13bbbdbfd61c
  style 8ccd9633_e994_9107_5bbb_051de8bbbf05 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java lines 716–729

		private void createWithPlatform(@Nullable String apiVersion) throws IOException, URISyntaxException {
			ImageReference imageReference = ImageReference.of("ubuntu:bionic");
			ContainerConfig config = ContainerConfig.of(imageReference, (update) -> update.withCommand("/bin/bash"));
			ImagePlatform platform = ImagePlatform.of("linux/arm64/v1");
			URI createUri = new URI(CONTAINERS_URL + "/create?platform=linux%2Farm64%2Fv1");
			given(http().post(eq(createUri), eq("application/json"), any()))
				.willReturn(responseOf("create-container-response.json"));
			ContainerReference containerReference = this.api.create(config, platform);
			assertThat(containerReference).hasToString("e90e34656806");
			then(http()).should().post(any(), any(), this.writer.capture());
			ByteArrayOutputStream out = new ByteArrayOutputStream();
			this.writer.getValue().accept(out);
			assertThat(out.toByteArray()).hasSize(config.toString().length());
		}

Subdomains

Called By

  • createWithPlatformAndUnknownApiVersionAttemptsCreate()

Frequently Asked Questions

What does createWithPlatform() do?
createWithPlatform() is a function in the spring-boot codebase.
What does createWithPlatform() call?
createWithPlatform() calls 4 function(s): http, responseOf, toString, withCommand.
What calls createWithPlatform()?
createWithPlatform() is called by 1 function(s): createWithPlatformAndUnknownApiVersionAttemptsCreate.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free