blob: 1b96f88bf1ce431d0da58dee0ce03971e55c0f21 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.knox</groupId>
<artifactId>gateway</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-docker</artifactId>
<name>gateway-docker</name>
<description>Docker images for the Apache Knox project</description>
<dependencies>
<dependency>
<groupId>org.apache.knox</groupId>
<artifactId>gateway-release</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<!-- Use the execution instead of configuration to bind it to package -->
<executions>
<execution>
<id>binary-assembly</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/assembly/docker-files.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- Profile for building official Docker images. Not bound to build phases since that would require anyone build to have the Docker engine installed on their machine -->
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/docker</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/../target/${project.version}</directory>
<includes>
<include>knox-${project.version}.zip</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven-plugin.version}</version>
<configuration>
<contextDirectory>${project.build.outputDirectory}/docker</contextDirectory>
<repository>apache/knox</repository>
<buildArgs>
<RELEASE_FILE>knox-${project.version}.zip</RELEASE_FILE>
</buildArgs>
</configuration>
<executions>
<execution>
<id>gateway</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<tag>gateway-${project.version}</tag>
<buildArgs>
<ENTRYPOINT>gateway-entrypoint.sh</ENTRYPOINT>
<EXPOSE_PORT>8443</EXPOSE_PORT>
</buildArgs>
</configuration>
</execution>
<execution>
<id>ldap</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<tag>ldap-${project.version}</tag>
<buildArgs>
<ENTRYPOINT>ldap-entrypoint.sh</ENTRYPOINT>
<EXPOSE_PORT>33389</EXPOSE_PORT>
</buildArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>