{"id":123550,"date":"2026-04-27T09:55:12","date_gmt":"2026-04-27T09:55:12","guid":{"rendered":"https:\/\/foojay.io\/?p=123550"},"modified":"2026-04-24T13:58:17","modified_gmt":"2026-04-24T13:58:17","slug":"dockerizing-a-java-26-project-with-docker-init","status":"publish","type":"post","link":"https:\/\/foojay.io\/today\/dockerizing-a-java-26-project-with-docker-init\/","title":{"rendered":"Dockerizing a Java 26 Project with Docker Init"},"content":{"rendered":"\n    <div class=\"article__table\">\n        <div class=\"article__table-header\">\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <path d=\"M8 6H21\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                <path d=\"M8 12H21\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                <path d=\"M8 18H21\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                <path d=\"M3 6H3.01\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                <path d=\"M3 12H3.01\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                <path d=\"M3 18H3.01\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n            <\/svg>\n            Table of Contents\n            <svg class=\"chevron\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <path d=\"M18 15L12 9L6 15\" stroke=\"#3562E5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n            <\/svg>\n        <\/div>\n        <div class=\"article__table-body\"><span><a href=\"#h2-0--echnical-equirements\">Technical Requirements<\/a><\/span><span><a href=\"#h2-1--reate-a-ew-roject\">Create a New Project<\/a><\/span><span><a href=\"#h2-2--un-ocker-nit\">Run Docker Init<\/a><\/span><span><a href=\"#h2-3--ote-on-ava-26-ase-mages\">A Note on Java 26 Base Images<\/a><\/span><span><a href=\"#h2-4--uild-and-un\">Build and Run<\/a><\/span><span><a href=\"#h2-5--dd-a-ontroller\">Add a Controller<\/a><\/span><span><a href=\"#h2-6--ore-inks\">More Links<\/a><\/span><span><a href=\"#h2-7--onclusion\">Conclusion<\/a><\/span><\/div><\/div><!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><p>Docker Init was introduced in Docker Desktop 4.27, before LLMs became the default answer to everything. It&rsquo;s a \"smart\" interactive wizard that analyzes your project and generates:<\/p>\n<ul>\n<li>\n<p>A <code>Dockerfile<\/code> (multi-stage, production-ready)<\/p>\n<\/li>\n<li>\n<p>A <code>compose.yaml<\/code> file<\/p>\n<\/li>\n<li>\n<p>A <code>.dockerignore<\/code> file<\/p>\n<\/li>\n<li>\n<p>A <code>README.Docker.md<\/code> with build and run instructions<\/p>\n<\/li>\n<\/ul>\n<p>What makes it valuable is that it&rsquo;s deterministic&mdash;not a probabilistic guess. It produces the same correct output every time, following Docker&rsquo;s own best practices.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/dockersecurity.io\/commandos-asgard\/asgard-init.png\" alt=\"Docker Commandos setting up the command center\"><\/p>\n<h2 id=\"h2-0--echnical-equirements\">Technical Requirements<\/h2>\n<ul>\n<li>\n<p>Docker Desktop 4.27 or later<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"h2-1--reate-a-ew-roject\">Create a New Project<\/h2>\n<p>I&rsquo;m using a Spring Boot project. Because it&rsquo;s early Spring now and I haven&rsquo;t touched one in a while&mdash;so let&rsquo;s go.<\/p>\n<p>Head to <a target=\"_blank\" href=\"https:\/\/start.spring.io\/\" class=\"bare\">https:\/\/start.spring.io\/<\/a> and create a project with:<\/p>\n<ul>\n<li>\n<p><strong>Project:<\/strong> Maven<\/p>\n<\/li>\n<li>\n<p><strong>Language:<\/strong> Java<\/p>\n<\/li>\n<li>\n<p><strong>Spring Boot:<\/strong> 4.0.5 <strong>(or whatever the latest stable is)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Packaging:<\/strong> Jar<\/p>\n<\/li>\n<li>\n<p><strong>Java:<\/strong> 26<\/p>\n<\/li>\n<\/ul>\n<p>I used these coordinates, but pick your own:<\/p>\n<ul>\n<li>\n<p><strong>Group:<\/strong> io.dockersecurity<\/p>\n<\/li>\n<li>\n<p><strong>Artifact:<\/strong> hello-wowlrd<\/p>\n<\/li>\n<li>\n<p><strong>Package Name:<\/strong> io.dockersecurity.hello-wowlrd<\/p>\n<\/li>\n<\/ul>\n<p>Download, unzip, and step into the directory:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cd hello-wowlrd<\/pre>\n<h2 id=\"h2-2--un-ocker-nit\">Run Docker Init<\/h2>\n<p>As my British friend say, \"It&rsquo;s Docker, innit?\"<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">docker init<\/pre>\n<p>The interactive wizard detects your Java project automatically. Accept \"Java\", confirm the source directory and Java version, and enter the port:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"text\">? What application platform does your project use? Java\r\n? What's the relative directory (with a leading .) for your app? .\/src\r\n? What version of Java do you want to use? 26\r\n? What port does your server listen on? 8080<\/pre>\n<p>Docker Init generates four files. The one that matters most is the <code>Dockerfile<\/code>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"dockerfile\"># syntax=docker\/dockerfile:1\r\n\r\n################################################################################\r\n# Stage 1: resolve and download dependencies\r\nFROM eclipse-temurin:26-jdk-jammy as deps\r\n\r\nWORKDIR \/build\r\n\r\nCOPY --chmod=0755 mvnw mvnw\r\nCOPY .mvn\/ .mvn\/\r\n\r\nRUN --mount=type=bind,source=pom.xml,target=pom.xml \\\r\n    --mount=type=cache,target=\/root\/.m2 .\/mvnw dependency:go-offline -DskipTests\r\n\r\n################################################################################\r\n# Stage 2: build the application\r\nFROM deps as package\r\n\r\nWORKDIR \/build\r\n\r\nCOPY .\/src src\/\r\nRUN --mount=type=bind,source=pom.xml,target=pom.xml \\\r\n    --mount=type=cache,target=\/root\/.m2 \\\r\n    .\/mvnw package -DskipTests &amp;&amp; \\\r\n    mv target\/$(.\/mvnw help:evaluate -Dexpression=project.artifactId -q -DforceStdout)-$(.\/mvnw help:evaluate -Dexpression=project.version -q -DforceStdout).jar target\/app.jar\r\n\r\n################################################################################\r\n# Stage 3: extract Spring Boot layers\r\nFROM package as extract\r\n\r\nWORKDIR \/build\r\n\r\nRUN java -Djarmode=layertools -jar target\/app.jar extract --destination target\/extracted\r\n\r\n################################################################################\r\n# Stage 4: minimal runtime image\r\nFROM eclipse-temurin:26-jre-jammy AS final\r\n\r\nARG UID=10001\r\nRUN adduser \\\r\n    --disabled-password \\\r\n    --gecos \"\" \\\r\n    --home \"\/nonexistent\" \\\r\n    --shell \"\/sbin\/nologin\" \\\r\n    --no-create-home \\\r\n    --uid \"${UID}\" \\\r\n    appuser\r\nUSER appuser\r\n\r\nCOPY --from=extract build\/target\/extracted\/dependencies\/ .\/\r\nCOPY --from=extract build\/target\/extracted\/spring-boot-loader\/ .\/\r\nCOPY --from=extract build\/target\/extracted\/snapshot-dependencies\/ .\/\r\nCOPY --from=extract build\/target\/extracted\/application\/ .\/\r\n\r\nEXPOSE 8080\r\n\r\nENTRYPOINT [ \"java\", \"org.springframework.boot.loader.launch.JarLauncher\" ]<\/pre>\n<p>This is already a proper multi-stage build: separate stages for dependency resolution, compilation, layer extraction, and a minimal runtime image with a non-root user. Gord would approve.<\/p>\n<h2 id=\"h2-3--ote-on-ava-26-ase-mages\">A Note on Java 26 Base Images<\/h2>\n<p>The generated Dockerfile references <code>eclipse-temurin:26-jdk-jammy<\/code> and <code>eclipse-temurin:26-jre-jammy<\/code>. Since Java 26 was just released, these Eclipse Temurin images may not be fully available on Docker Hub yet.<\/p>\n<p>Swap them out for SAP Machine images instead&mdash;SAP&rsquo;s free OpenJDK distribution ships Java 26 on Ubuntu 24.04 (Noble Numbat):<\/p>\n<ul>\n<li>\n<p><code>sapmachine:26-jdk-ubuntu-noble<\/code><\/p>\n<\/li>\n<li>\n<p><code>sapmachine:26-jre-ubuntu-noble<\/code><\/p>\n<\/li>\n<\/ul>\n<p>Find them on Docker Hub: <a target=\"_blank\" href=\"https:\/\/hub.docker.com\/_\/sapmachine\" class=\"bare\">https:\/\/hub.docker.com\/_\/sapmachine<\/a>. Just replace <code>eclipse-temurin<\/code> with <code>sapmachine<\/code> in both <code>FROM<\/code> lines.<\/p>\n<h2 id=\"h2-4--uild-and-un\">Build and Run<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">docker compose up --build<\/pre>\n<p>The generated <code>compose.yaml<\/code> is minimal:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">services:\r\n  server:\r\n    build:\r\n      context: .\r\n    ports:\r\n      - 8080:8080<\/pre>\n<p>The application starts, and immediately stops with exit code 0. That&rsquo;s expected: there&rsquo;s no HTTP endpoint to keep it alive.<\/p>\n<h2 id=\"h2-5--dd-a-ontroller\">Add a Controller<\/h2>\n<p>Create <code>src\/main\/java\/io\/dockersecurity\/hellowowlrd\/HelloController.java<\/code>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">package io.dockersecurity.hellowowlrd;\r\n\r\nimport org.springframework.web.bind.annotation.GetMapping;\r\nimport org.springframework.web.bind.annotation.RestController;\r\n\r\n@RestController\r\npublic class HelloController {\r\n\r\n    @GetMapping(\"\/\")\r\n    public String hello() {\r\n        return \"Hello, Docker Security!\";\r\n    }\r\n}<\/pre>\n<p>Add the Spring Web dependency to <code>pom.xml<\/code>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<p>Build and run again:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">docker compose up --build<\/pre>\n<p>Verify:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">curl http:\/\/localhost:8080\r\n# Hello, Docker Security!<\/pre>\n<h2 id=\"h2-6--ore-inks\">More Links<\/h2>\n<p>Docker Init supports more than Java. If you want to try it with other languages, Docker&rsquo;s official guides are the place to start: <a target=\"_blank\" href=\"https:\/\/docs.docker.com\/guides\/\" class=\"bare\">https:\/\/docs.docker.com\/guides\/<\/a>.<\/p>\n<p>I co-authored the C++ guide&mdash;Docker thanked me for it at the top of the page, which means I wrote those words and then thanked myself on their behalf. Worth a read:<\/p>\n<ul>\n<li>\n<p><a target=\"_blank\" href=\"https:\/\/docs.docker.com\/guides\/cpp\/\" class=\"bare\">https:\/\/docs.docker.com\/guides\/cpp\/<\/a><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"h2-7--onclusion\">Conclusion<\/h2>\n<p>Java 26 just shipped and Docker Init handles it cleanly out of the box&mdash;multi-stage build, layer extraction, non-root user, bind mounts for caching. You get a production-ready Dockerfile in under a minute. When Eclipse Temurin catches up, swap the base images back. Until then, SAP Machine has you covered.<\/p>\n<p>If you want to learn about more Docker Commandos (or commands) head to: <a target=\"_blank\" href=\"https:\/\/dockersecurity.io\/commandos\" class=\"bare\">https:\/\/dockersecurity.io\/commandos<\/a>.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Table of Contents Technical RequirementsCreate a New ProjectRun Docker InitA Note on Java 26 Base ImagesBuild and RunAdd a ControllerMore LinksConclusion Docker Init was introduced in Docker Desktop 4.27, before LLMs became the default answer to everything. It&rsquo;s a &#8220;smart&#8221; &#8230;<\/p>\n","protected":false},"author":771,"featured_media":123551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[311,1722,1244],"tags":[309,2540,1148],"class_list":["post-123550","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-java","category-java-beginner","tag-docker","tag-docker-commandos","tag-docker-desktop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dockerizing a Java 26 Project with Docker Init<\/title>\n<meta name=\"description\" content=\"Java 26 came out in March 2026. This article walks you through Dockerizing a Java 26 Spring Boot project using Docker Init.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dockerizing a Java 26 Project with Docker Init\" \/>\n<meta property=\"og:description\" content=\"Java 26 came out in March 2026. This article walks you through Dockerizing a Java 26 Spring Boot project using Docker Init.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init\" \/>\n<meta property=\"og:site_name\" content=\"foojay\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-27T09:55:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/asgard-init-1024x765.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"765\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mohammad-Ali A&#039;r\u00e2bi\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mohammad-Ali A&#039;r\u00e2bi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/foojay.io\\\/today\\\/dockerizing-a-java-26-project-with-docker-init\\\/\"},\"author\":{\"name\":\"Mohammad-Ali A'r\u00e2bi\",\"@id\":\"https:\\\/\\\/foojay.io\\\/#\\\/schema\\\/person\\\/26c642c069f3dba12d6ec40d382dd6a8\"},\"headline\":\"Dockerizing a Java 26 Project with Docker Init\",\"datePublished\":\"2026-04-27T09:55:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/foojay.io\\\/today\\\/dockerizing-a-java-26-project-with-docker-init\\\/\"},\"wordCount\":476,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/foojay.io\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/asgard-init.png\",\"keywords\":[\"docker\",\"docker commandos\",\"docker desktop\"],\"articleSection\":[\"DevOps\",\"Java\",\"Java Beginner\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/foojay.io\\\/today\\\/dockerizing-a-java-26-project-with-docker-init\\\/\",\"url\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init\",\"name\":\"Dockerizing a Java 26 Project with Docker Init\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/foojay.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/asgard-init.png\",\"datePublished\":\"2026-04-27T09:55:12+00:00\",\"description\":\"Java 26 came out in March 2026. This article walks you through Dockerizing a Java 26 Spring Boot project using Docker Init.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#primaryimage\",\"url\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/asgard-init.png\",\"contentUrl\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/asgard-init.png\",\"width\":2400,\"height\":1792,\"caption\":\"Docker Commando 1. Docker Init\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dockersecurity.io\\\/blog\\\/dockerize-java-26-with-docker-init#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/foojay.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dockerizing a Java 26 Project with Docker Init\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/foojay.io\\\/#website\",\"url\":\"https:\\\/\\\/foojay.io\\\/\",\"name\":\"foojay\",\"description\":\"a place for friends of OpenJDK\",\"publisher\":{\"@id\":\"https:\\\/\\\/foojay.io\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/foojay.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/foojay.io\\\/#organization\",\"name\":\"foojay\",\"url\":\"https:\\\/\\\/foojay.io\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/foojay.io\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/cropped-Favicon.png\",\"contentUrl\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/cropped-Favicon.png\",\"width\":512,\"height\":512,\"caption\":\"foojay\"},\"image\":{\"@id\":\"https:\\\/\\\/foojay.io\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/foojay2020\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/foojay.io\\\/#\\\/schema\\\/person\\\/26c642c069f3dba12d6ec40d382dd6a8\",\"name\":\"Mohammad-Ali A'r\u00e2bi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-mohammad-ali-arabi-96x96.png\",\"url\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-mohammad-ali-arabi-96x96.png\",\"contentUrl\":\"https:\\\/\\\/foojay.io\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-mohammad-ali-arabi-96x96.png\",\"caption\":\"Mohammad-Ali A'r\u00e2bi\"},\"description\":\"Senior Software Engineer at JobRad GmbH, Docker Captain, Snyk Ambassador, DevSecOps Advocate, Author of \u201cDocker and Kubernetes Security\u201d, Mortal Kombat Enthusiast\",\"sameAs\":[\"https:\\\/\\\/aerabi.com\\\/\",\"https:\\\/\\\/www.instagram.com\\\/aerabi.tech\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/aerabi\\\/\",\"https:\\\/\\\/x.com\\\/MohammadAliEN\"],\"url\":\"https:\\\/\\\/foojay.io\\\/today\\\/author\\\/aerabi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dockerizing a Java 26 Project with Docker Init","description":"Java 26 came out in March 2026. This article walks you through Dockerizing a Java 26 Spring Boot project using Docker Init.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init","og_locale":"en_US","og_type":"article","og_title":"Dockerizing a Java 26 Project with Docker Init","og_description":"Java 26 came out in March 2026. This article walks you through Dockerizing a Java 26 Spring Boot project using Docker Init.","og_url":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init","og_site_name":"foojay","article_published_time":"2026-04-27T09:55:12+00:00","og_image":[{"width":1024,"height":765,"url":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/asgard-init-1024x765.png","type":"image\/png"}],"author":"Mohammad-Ali A'r\u00e2bi","twitter_misc":{"Written by":"Mohammad-Ali A'r\u00e2bi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#article","isPartOf":{"@id":"https:\/\/foojay.io\/today\/dockerizing-a-java-26-project-with-docker-init\/"},"author":{"name":"Mohammad-Ali A'r\u00e2bi","@id":"https:\/\/foojay.io\/#\/schema\/person\/26c642c069f3dba12d6ec40d382dd6a8"},"headline":"Dockerizing a Java 26 Project with Docker Init","datePublished":"2026-04-27T09:55:12+00:00","mainEntityOfPage":{"@id":"https:\/\/foojay.io\/today\/dockerizing-a-java-26-project-with-docker-init\/"},"wordCount":476,"commentCount":1,"publisher":{"@id":"https:\/\/foojay.io\/#organization"},"image":{"@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#primaryimage"},"thumbnailUrl":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/asgard-init.png","keywords":["docker","docker commandos","docker desktop"],"articleSection":["DevOps","Java","Java Beginner"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#respond"]}]},{"@type":"WebPage","@id":"https:\/\/foojay.io\/today\/dockerizing-a-java-26-project-with-docker-init\/","url":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init","name":"Dockerizing a Java 26 Project with Docker Init","isPartOf":{"@id":"https:\/\/foojay.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#primaryimage"},"image":{"@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#primaryimage"},"thumbnailUrl":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/asgard-init.png","datePublished":"2026-04-27T09:55:12+00:00","description":"Java 26 came out in March 2026. This article walks you through Dockerizing a Java 26 Spring Boot project using Docker Init.","breadcrumb":{"@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#primaryimage","url":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/asgard-init.png","contentUrl":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/asgard-init.png","width":2400,"height":1792,"caption":"Docker Commando 1. Docker Init"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dockersecurity.io\/blog\/dockerize-java-26-with-docker-init#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/foojay.io\/"},{"@type":"ListItem","position":2,"name":"Dockerizing a Java 26 Project with Docker Init"}]},{"@type":"WebSite","@id":"https:\/\/foojay.io\/#website","url":"https:\/\/foojay.io\/","name":"foojay","description":"a place for friends of OpenJDK","publisher":{"@id":"https:\/\/foojay.io\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/foojay.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/foojay.io\/#organization","name":"foojay","url":"https:\/\/foojay.io\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/foojay.io\/#\/schema\/logo\/image\/","url":"https:\/\/foojay.io\/wp-content\/uploads\/2020\/04\/cropped-Favicon.png","contentUrl":"https:\/\/foojay.io\/wp-content\/uploads\/2020\/04\/cropped-Favicon.png","width":512,"height":512,"caption":"foojay"},"image":{"@id":"https:\/\/foojay.io\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/foojay2020"]},{"@type":"Person","@id":"https:\/\/foojay.io\/#\/schema\/person\/26c642c069f3dba12d6ec40d382dd6a8","name":"Mohammad-Ali A'r\u00e2bi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/cropped-mohammad-ali-arabi-96x96.png","url":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/cropped-mohammad-ali-arabi-96x96.png","contentUrl":"https:\/\/foojay.io\/wp-content\/uploads\/2026\/04\/cropped-mohammad-ali-arabi-96x96.png","caption":"Mohammad-Ali A'r\u00e2bi"},"description":"Senior Software Engineer at JobRad GmbH, Docker Captain, Snyk Ambassador, DevSecOps Advocate, Author of \u201cDocker and Kubernetes Security\u201d, Mortal Kombat Enthusiast","sameAs":["https:\/\/aerabi.com\/","https:\/\/www.instagram.com\/aerabi.tech","https:\/\/www.linkedin.com\/in\/aerabi\/","https:\/\/x.com\/MohammadAliEN"],"url":"https:\/\/foojay.io\/today\/author\/aerabi\/"}]}},"_links":{"self":[{"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/posts\/123550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/users\/771"}],"replies":[{"embeddable":true,"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/comments?post=123550"}],"version-history":[{"count":0,"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/posts\/123550\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/media\/123551"}],"wp:attachment":[{"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/media?parent=123550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/categories?post=123550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/foojay.io\/wp-json\/wp\/v2\/tags?post=123550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}