createDockerContext() — spring-boot Function Reference
Architecture documentation for the createDockerContext() function in DockerConfigurationMetadata.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD be91c0a6_279d_c127_7e4a_1f3bf82c5742["createDockerContext()"] c4efc81f_ff15_7de6_01dc_2d5748d72238["forContext()"] c4efc81f_ff15_7de6_01dc_2d5748d72238 -->|calls| be91c0a6_279d_c127_7e4a_1f3bf82c5742 e2f59cdc_ac98_582e_bb45_2392be37db9d["create()"] e2f59cdc_ac98_582e_bb45_2392be37db9d -->|calls| be91c0a6_279d_c127_7e4a_1f3bf82c5742 83fb9165_0ebf_e1b8_0897_15b25f53b630["asHash()"] be91c0a6_279d_c127_7e4a_1f3bf82c5742 -->|calls| 83fb9165_0ebf_e1b8_0897_15b25f53b630 403fa7ea_bc3d_2449_e5c8_35453034dc79["of()"] be91c0a6_279d_c127_7e4a_1f3bf82c5742 -->|calls| 403fa7ea_bc3d_2449_e5c8_35453034dc79 a4c5e1b2_4d7c_4724_529c_acc76613fd65["readPathContent()"] be91c0a6_279d_c127_7e4a_1f3bf82c5742 -->|calls| a4c5e1b2_4d7c_4724_529c_acc76613fd65 a3f3ed28_6f64_5789_dfeb_dbeb343c7fb0["withTlsPath()"] be91c0a6_279d_c127_7e4a_1f3bf82c5742 -->|calls| a3f3ed28_6f64_5789_dfeb_dbeb343c7fb0 afff5233_f76c_519f_cb50_e26460b9293c["empty()"] be91c0a6_279d_c127_7e4a_1f3bf82c5742 -->|calls| afff5233_f76c_519f_cb50_e26460b9293c 0cfd5d92_9f6d_4c32_1c40_bc55129aa432["fromJson()"] be91c0a6_279d_c127_7e4a_1f3bf82c5742 -->|calls| 0cfd5d92_9f6d_4c32_1c40_bc55129aa432 style be91c0a6_279d_c127_7e4a_1f3bf82c5742 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfigurationMetadata.java lines 128–148
private static DockerContext createDockerContext(String configLocation, @Nullable String currentContext) {
if (currentContext == null || DEFAULT_CONTEXT.equals(currentContext)) {
return DockerContext.empty();
}
String hash = asHash(currentContext);
Path metaPath = Path.of(configLocation, CONTEXTS_DIR, META_DIR, hash, CONTEXT_FILE_NAME);
Path tlsPath = Path.of(configLocation, CONTEXTS_DIR, TLS_DIR, hash, DOCKER_ENDPOINT);
if (!metaPath.toFile().exists()) {
throw new IllegalArgumentException("Docker context '" + currentContext + "' does not exist");
}
try {
DockerContext context = DockerContext.fromJson(readPathContent(metaPath));
if (tlsPath.toFile().isDirectory()) {
return context.withTlsPath(tlsPath.toString());
}
return context;
}
catch (JacksonException ex) {
throw new IllegalStateException("Error parsing Docker context metadata file '" + metaPath + "'", ex);
}
}
Domain
Subdomains
Called By
- create()
- forContext()
Source
Frequently Asked Questions
What does createDockerContext() do?
createDockerContext() is a function in the spring-boot codebase.
What does createDockerContext() call?
createDockerContext() calls 6 function(s): asHash, empty, fromJson, of, readPathContent, withTlsPath.
What calls createDockerContext()?
createDockerContext() is called by 2 function(s): create, forContext.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free