4.0 KiB

BeeDK Docker Alfresco Transform Engine Maven Tile

This is a component within the proposed BeeDK. It is considered to be part of the Public API of the BeeDK.

Purpose

This project creates a Maven Tile that provides the basis for any ATE that is delivered as a Docker Image.

Usage

To use this plugin, just reference it with the Maven Tiles plugin as shown in the following snippet. Do not forget the extensions element in the plugin configuration.

<project ...>
	...
	<build>
		...
		<plugins>
			<plugin>
				<groupId>io.repaint.maven</groupId>
				<artifactId>tiles-maven-plugin</artifactId>
				<version>[2.0,3.0)</version>
				<extensions>true</extensions>
				<configuration>
					<tiles>
						...
						<!-- Documentation: https://git.inteligr8.com/inteligr8/ootbee-beedk/src/branch/stable/beedk-ate-docker-tile -->
						<tile>com.inteligr8.ootbee:beedk-ate-docker-tile:[1.0.0,2.0.0)</tile>
						<!-- See Below
						<tile>com.inteligr8.ootbee:beedk-ate-springboot-tile:[1.0.0,2.0.0)</tile>
						-->
					</tiles>
				</configuration>
			</plugin>
			...
		</plugins>
		...
	</build>
	...
</project>

This tile is nearly always used in conjunction with beedk-ate-springboot-tile Maven Tile. If the Dockerfile intends to package the Spring Boot application, this Maven Tile must be declared BEFORE that Maven Tile.

Configuration

In your Maven project, set the following properties to define the behavior of this Maven Tile. Unless otherwise stated, they can only be overridden in the project POM or other Maven Tiles loaded earlier than this Maven Tile.

Public API

The following properties are intended to be exposed by inheriting Public API Maven Tiles.

Maven Property Required Default Description
docker.source.directory src/main/docker The source directory of the Dockerfile and related resources.
Inherited from beedk-springboot-docker-base-tile
beedk.deploy.dockerImageOnly true Set to true to skip the Maven deploy of the Spring Boot application; false to deploy it to the configured Maven Repository. Regardless, the Docker Image will be deployed to the configured Docker Registry.
Inherited from beedk-springboot-docker-base-tile
docker.image.registry Yes The Docker Registry where to push the built Docker Image. If none is specified, Docker pushes to the Docker Hub.
Inherited from beedk-springboot-docker-base-tile
docker.image.name Yes The Docker Image name. You typically want to pattern it as prefix/${project.artifactId}.
Inherited from beedk-springboot-docker-base-tile
docker.image.tag Project Version The Docker Image tag or label. This will default to the Maven project version.
Inherited from beedk-springboot-docker-base-tile

Results

A Docker image will be built using your local Docker installation during the package phase. It will be tagged both with and without the configured Docker Registry. During the deploy phase, the Docker image will be pushed to the configured Docker Registry.

Initialization

This tile comes with the ability to initialize your project with a sample file of a Docker ATE. You can do this by executing any Maven build with the scaffold property.

mvn -Dscaffold generate-sources