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

createWithPlatformCreatesContainer() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  49702d73_075d_c474_f7c1_aa657dc6b17d["createWithPlatformCreatesContainer()"]
  274a52b3_b07b_ef2a_172f_1c8b25267451["withCommand()"]
  49702d73_075d_c474_f7c1_aa657dc6b17d -->|calls| 274a52b3_b07b_ef2a_172f_1c8b25267451
  c8868b7f_8c53_fa0f_029b_adb439a84967["setVersion()"]
  49702d73_075d_c474_f7c1_aa657dc6b17d -->|calls| c8868b7f_8c53_fa0f_029b_adb439a84967
  ffedf588_7c32_be87_49b5_6f0bec311aa1["http()"]
  49702d73_075d_c474_f7c1_aa657dc6b17d -->|calls| ffedf588_7c32_be87_49b5_6f0bec311aa1
  88e4c755_21cd_03d2_7b78_c0a678363843["responseOf()"]
  49702d73_075d_c474_f7c1_aa657dc6b17d -->|calls| 88e4c755_21cd_03d2_7b78_c0a678363843
  759ca794_5cea_60bd_cef5_13bbbdbfd61c["toString()"]
  49702d73_075d_c474_f7c1_aa657dc6b17d -->|calls| 759ca794_5cea_60bd_cef5_13bbbdbfd61c
  style 49702d73_075d_c474_f7c1_aa657dc6b17d 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 694–709

		@Test
		void createWithPlatformCreatesContainer() throws Exception {
			ImageReference imageReference = ImageReference.of("ubuntu:bionic");
			ContainerConfig config = ContainerConfig.of(imageReference, (update) -> update.withCommand("/bin/bash"));
			ImagePlatform platform = ImagePlatform.of("linux/arm64/v1");
			setVersion("1.41");
			URI createUri = new URI("/v1.41/containers/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

Frequently Asked Questions

What does createWithPlatformCreatesContainer() do?
createWithPlatformCreatesContainer() is a function in the spring-boot codebase.
What does createWithPlatformCreatesContainer() call?
createWithPlatformCreatesContainer() calls 5 function(s): http, responseOf, setVersion, toString, withCommand.

Analyze Your Own Codebase

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

Try Supermodel Free