Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaStere42 authored Mar 13, 2024
1 parent 135be46 commit 8161c0b
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions devops/wildbook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,23 @@ RUN echo "ARGS AZURE_DEVOPS_CACHEBUSTER=${AZURE_DEVOPS_CACHEBUSTER}"

# Install apt packages
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y imagemagick && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y imagemagick git=1:2.11.0-3+deb9u3 maven=3.3.9-4 && rm -rf /var/lib/apt/lists/*

##########################################################################################
FROM openjdk:8u171-jdk as wb-test

# The arg recieves the value from the build script --build-args, but swapping for an
# env allows it to keep this value after the current container is built.
ARG branch=master
ENV branch=${branch}

# Install apt packages
RUN apt-get update && apt-get install -y git=1:2.11.0-3+deb9u3 maven=3.3.9-4 && rm -rf /var/lib/apt/lists/*

# Create ibeis source location
RUN mkdir -p /wildbook \
&& cd wildbook \
&& git clone https://github.com/TanyaStere42/Wildbook.git
# Create Wildbook source location
RUN mkdir -p /wildbook && cd wildbook && git clone https://github.com/TanyaStere42/Wildbook.git

# Did that arg make it?
RUN echo ${branch}

# Make sure we get the correct branch and most recent version of it.
RUN cd wildbook/Wildbook/ \
&& git checkout -f ${branch} \
&& git pull
RUN cd wildbook/Wildbook/ && git checkout master && git pull

# Copy branch specific build files.
COPY ./_config/${branch}/jdoconfig.properties /wildbook/Wildbook/src/main/resources/bundles/jdoconfig.properties
COPY ./_config/${branch}/commonConfiguration.properties /wildbook/Wildbook/src/main/resources/bundles/commonConfiguration.properties

# Build and move the war file, skipping tests and other verbosity
RUN cd wildbook/Wildbook \
&& mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B \
&& cp target/wildbook-*.war /wildbook/wildbook.war
RUN cd wildbook/Wildbook && mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B && cp target/wildbook-*.war /wildbook/wildbook.war

##########################################################################################
FROM wb-test
Expand All @@ -57,9 +40,7 @@ ADD ./_config/${branch}/server.xml /usr/local/tomcat/conf/server.xml

COPY --from=org.wildme.wildbook.build /wildbook/wildbook.war /usr/local/tomcat/webapps/wildbook.war

RUN mkdir -p /data/ \
&& mkdir -p /data/wildbook_data_dir \
&& ln -s /data/wildbook_data_dir /usr/local/tomcat/webapps/wildbook_data_dir
RUN mkdir -p /data/ && mkdir -p /data/wildbook_data_dir && ln -s /data/wildbook_data_dir /usr/local/tomcat/webapps/wildbook_data_dir

VOLUME /data/wildbook_data_dir

Expand Down

0 comments on commit 8161c0b

Please sign in to comment.