mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

vharseko
29.36.2019 4a3ee6fc7243c131f002b481a60939376528bb97
build docker from local image
2 files modified
81 ■■■■■ changed files
opendj-packages/opendj-docker/Dockerfile 8 ●●●● patch | view | raw | blame | history
opendj-packages/opendj-docker/pom.xml 73 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-docker/Dockerfile
@@ -22,16 +22,12 @@
ENV OPENDJ_REPLICATION_TYPE=${OPENDJ_REPLICATION_TYPE}
ARG VERSION=@project_version@
ENV OPENDJ_USER="opendj"
WORKDIR /opt
RUN wget --show-progress --progress=bar:force:noscroll --quiet \
  https://github.com/OpenIdentityPlatform/OpenDJ/releases/download/$VERSION/opendj-$VERSION.zip && \
  unzip opendj-$VERSION.zip && \
  rm -r opendj-$VERSION.zip
ADD target/opendj-*.zip .
RUN unzip opendj-*.zip && rm -r opendj-*.zip
ADD bootstrap/ /opt/opendj/bootstrap/
opendj-packages/opendj-docker/pom.xml
@@ -41,32 +41,55 @@
    <build>
      <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.forgerock.opendj</groupId>
                  <artifactId>opendj-server-legacy</artifactId>
                  <version>${project.version}</version>
                  <type>zip</type>
                  <overWrite>true</overWrite>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/</outputDirectory>
              <overWriteReleases>true</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </plugin>
        <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                      <execution>
                        <phase>prepare-package</phase>
                        <configuration>
                          <tasks>
                            <copy todir="${project.build.directory}/opendj-docker/">
                                    <fileset dir="${basedir}">
                                      <include name="Dockerfile" />  <!--NOTE DIFFERENCE HERE-->
                        <include name="bootstrap/**" />
                        <include name="run.sh" />
                                    </fileset>
                                  </copy>
                            <replace token="@project_version@" value="${project.version}" dir="${project.build.directory}/opendj-docker/">
                              <include name="Dockerfile" />
                            </replace>
                    <zip basedir="${project.build.directory}" destfile="${project.build.directory}/Dockerfile.zip" includes="opendj-docker/**" />
                          </tasks>
                        </configuration>
                        <goals>
                          <goal>run</goal>
                        </goals>
                      </execution>
                    </executions>
                  </plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>prepare-package</phase>
                <configuration>
                  <tasks>
                      <zip basedir="${project.build.directory}" destfile="${project.build.directory}/Dockerfile.zip" includes="opendj-docker/**" >
                        <fileset dir="${basedir}">
                            <include name="Dockerfile" />  <!--NOTE DIFFERENCE HERE-->
                            <include name="bootstrap/**" />
                            <include name="run.sh" />
                        </fileset>
                      </zip>
                  </tasks>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
      </plugins>
    </build>
</project>