Skip to content

Commit

Permalink
Fixes #230 - Add Dockerfile for docker module (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem authored Jul 31, 2024
1 parent 906ef6b commit c2ebc23
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ jobs:
run: |
cd repo
mvn --ntp -P docker install docker:build docker:push
cd ../ui
mvn --ntp -P docker install docker:build docker:push
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ jobs:
run: |
cd repo
mvn --ntp -P docker install docker:build docker:push
cd ../ui
mvn --ntp -P docker install docker:build docker:push
81 changes: 80 additions & 1 deletion docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,84 @@
<artifactId>aegean-docker</artifactId>
<packaging>pom</packaging>
<name>Manorrock Aegean - Docker</name>
<profiles>
<profile>
<id>docker</id>
<dependencies>
<dependency>
<groupId>com.manorrock.aegean</groupId>
<artifactId>aegean</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.1</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.manorrock.aegean</groupId>
<artifactId>aegean</artifactId>
<version>${project.version}</version>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/wars</outputDirectory>
<destFileName>aegean.war</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/wars</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.44.0</version>
<configuration>
<images>
<image>
<alias>persian</alias>
<name>ghcr.io/manorrock/aegean:%l</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<contextDir>${basedir}</contextDir>
<dockerFile>src/main/docker/Dockerfile</dockerFile>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

16 changes: 16 additions & 0 deletions docker/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM eclipse-temurin:21
RUN cd /opt && \
export TOMCAT_VERSION=9.0.90 && \
curl --insecure -L -O https://archive.apache.org/dist/tomcat/tomcat-9/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz && \
tar xfvz apache-tomcat-${TOMCAT_VERSION}.tar.gz && \
mv apache-tomcat-${TOMCAT_VERSION} tomcat && \
rm apache-tomcat-${TOMCAT_VERSION}.tar.gz && \
rm -rf tomcat/webapps/*docs* && \
rm -rf tomcat/webapps/*examples* && \
rm -rf tomcat/webapps/*manager* && \
rm -rf tomcat/webapps/ROOT*
CMD ["/opt/tomcat/bin/catalina.sh", "run"]
EXPOSE 8080
WORKDIR /mnt
ENV ROOT_DIRECTORY /mnt
COPY target/wars/aegean.war /opt/tomcat/webapps/ROOT.war

0 comments on commit c2ebc23

Please sign in to comment.