====== Vibemosphere Docker Image Builder ====== Builds Docker images (.NET / ASP.NET Core, Java on Amazon Corretto Alpine, own Dockerfile) from templates and pushes them to the Vibecat registry. ^ Id | ''docker-image-builder'' | ^ Role | ''admin'' - needed for the page and the REST API (administrators always may) | ^ Page | **Plugins > Open** (overlay with an X at the top right) or ''/plugins/docker-image-builder/'' | ^ REST | ''/api/plugins/docker-image-builder/...'' and, for callers with the role, ''/plugins/docker-image-builder/...'' | ===== Open the configuration ===== In the administration open **Plugins**, select the row of this plug-in and press **Open**. The page opens in an overlay dialog: close it with the **X** at the top right, with Esc or by clicking outside; //Open in a new tab// next to the title shows it full size. {{vibecat:plugin-docker-image-builder.png?900|Vibemosphere Docker Image Builder: the plug-in page in its overlay dialog}} ===== The page in detail ===== {{vibecat:plugin-docker-image-builder-full.png?900|docker-image-builder: first tab, Build}} ===== Tabs ===== The page is divided into the tabs **Build**, **Images**, **Settings**. ==== Settings ==== {{vibecat:plugin-docker-image-builder-tab3.png?900|docker-image-builder: tab Settings}} ===== Fields and columns ===== ^ Label ^ Meaning ^ | Template | | | Folder or ZIP of the application | | | Image name | | | Tag | | | Platform (empty: this computer) | | | Registry (host:port of the Docker registry plug-in) | | | Registry user | | | API key (kept apart, never shown) | | | Default platform | | | Image | Column of a table | | Id | Column of a table | | Size | Column of a table | | Created | Column of a table | | Time | Column of a table | | Result | Column of a table | | Seconds | Column of a table | | By | Column of a table | ===== Actions ===== * **Show the Dockerfile** * **Build** * **Refresh** * **Save** ===== Reference ===== Builds Docker images from a folder or ZIP with the ''docker'' CLI of the computer that runs Vibecat (''docker build --progress=plain'', live log). **Administrators only.** A **template** is a JSON file with the parameters and the lines of the Dockerfile; a **preset** is a JSON file that remembers a build. ==== Templates ==== ^ template ^ for ^ result ^ | ''dotnet-published'' | a published .NET application, e.g. ''C:\Build\apps\net10.0\VECDS'' | ''mcr.microsoft.com/dotnet/aspnet:10.0-alpine'' (variants: noble, noble-chiseled, bookworm-slim), the folder copied to ''/app'', ''ENTRYPOINT dotnet args''; Alpine packages (''apk add icu-libs tzdata ...''), environment, data volume, user | | ''dotnet-source'' | a .NET project from source | two stages like the usual multi-stage Dockerfile: ''sdk:10.0-alpine'' restores and publishes, ''aspnet:10.0-alpine'' runs it | | ''java-corretto'' | a Java application folder (''lib/*.jar'', ''classes'', or one jar) | ''amazoncorretto:21-alpine'' - the small image (also ''21-alpine-full'', ''21-al2023'', 17, 25); ''java $JAVA_OPTS -cp ... MainClass'' or ''-jar''; bash for start scripts | | ''dockerfile-folder'' | a folder with its own Dockerfile | that Dockerfile (e.g. ''pimia_core/docker/Dockerfile.alpine''), with build arguments | Templates and presets are in the jar; files in the folders ''templates'' and ''presets'' of the plug-in data folder add to them or replace them (same id). A template: ''{"id", "name", "description", "parameters": [{"name", "label", "default", "options", "required", "hint", "multiline"}], "excludes": [...], "dockerfile": ["FROM ...${name}", ...]}''; the placeholders are the parameters and the blocks ''${apkBlock}'' ''${envBlock}'' ''${dataBlock}'' ''${userBlock}'' ''${portBlock}'' ''${argsJson}'' ''${javaStart}'' (a line that is only an empty block is left out). A ''.dockerignore'' is written from ''excludes''; the Dockerfile is kept outside of your folder, so the folder stays as it is. ==== Presets ==== * **vecds** - the published VECDS (''vecds.dll'' with ''--public --port 9090 --config /data/appsettings.json'': VECDS has these options already, so no change of VECDS is needed; its data is the volume ''/data''). * **pimia-core** - ''pimia_core/docker/Dockerfile.alpine'': Amazon Corretto 21 Alpine with bash for the FTP4ELO launch script (''DockerFileBuild.ps1 -Alpine'' builds the same). * **java-app-alpine** - an own Java application folder. ==== Registry ==== With the //Docker registry// plug-in: set its address (''host:port''), the user and an API key (kept apart, never shown). //Push after the build// logs in and pushes ''host:port/name:tag''. The docker engine must trust the certificate of the registry (the CA of the //CA// plug-in). [[vibecat:plugins:start|All plug-ins]]