Skip to content

Commit

Permalink
Per #521, working on Dockerfile.copy
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Apr 19, 2024
1 parent 7dddd4f commit 36d8db1
Showing 1 changed file with 26 additions and 37 deletions.
63 changes: 26 additions & 37 deletions internal/scripts/docker/Dockerfile.copy
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,50 @@ MAINTAINER Tatiana Burek <[email protected]>
# This Dockerfile checks out the METviewer dependencies from GitHub
# and builds the local version of the METviewer code.
#
ENV METVIEWER_GIT_NAME develop
ENV METCALCPY_GIT_NAME develop
ENV METPLOTPY_GIT_NAME develop
ENV METDATAIO_GIT_NAME develop

#
# Constants
# SOURCE_BRANCH is not defined when built via DockerHub.
#
ENV TOMCAT_MINOR_VERSION 5.61
ENV TOMCAT_MAJOR_VERSION 8
ENV TOMCAT_VERSION ${TOMCAT_MAJOR_VERSION}.${TOMCAT_MINOR_VERSION}

ENV METCALCPY_GIT_URL https://github.com/dtcenter/METcalcpy
ENV METPLOTPY_GIT_URL https://github.com/dtcenter/METplotpy
ENV METDATAIO_GIT_URL https://github.com/dtcenter/METdataio
ARG SOURCE_BRANCH
RUN if [ "x${SOURCE_BRANCH}" = "x" ]; then \
echo "ERROR: SOURCE_BRANCH undefined! Rebuild with \"--build-arg SOURCE_BRANCH={branch name}\""; \
exit 1; \
else \
echo "Build Argument SOURCE_BRANCH=${SOURCE_BRANCH}"; \
fi

#
# METVIEWER_GIT_NAME is required.
#
ARG METVIEWER_GIT_NAME
RUN if [ "x${METVIEWER_GIT_NAME}" = "x" ]; then \
echo "ERROR: METVIEWER_GIT_NAME undefined! Rebuild with \"--build-arg METVIEWER_GIT_NAME={branch, tag, or hash}\""; \
exit 1; \
else \
echo "Build Argument METVIEWER_GIT_NAME=${METVIEWER_GIT_NAME}"; \
fi

#
# METCALCPY_GIT_NAME is required.
# Use the develop branch for METviewer dependencies by default.
# Use "--build-arg" options to override.
#
RUN if [ "x${METCALCPY_GIT_NAME}" = "x" ]; then \
echo "ERROR: METCALCPY_GIT_NAME undefined! Rebuild with \"--build-arg METCALCPY_GIT_NAME={branch, tag, or hash}\""; \
exit 1; \
else \
echo "Build Argument METCALCPY_GIT_NAME=${METCALCPY_GIT_NAME}"; \
fi
ENV METVIEWER_REPO_DIR /METviewer
ENV METPLOTPY_GIT_URL https://github.com/dtcenter/METplotpy
ENV METPLOTPY_GIT_NAME develop
ENV METCALCPY_GIT_URL https://github.com/dtcenter/METcalcpy
ENV METCALCPY_GIT_NAME develop
ENV METDATAIO_GIT_URL https://github.com/dtcenter/METdataio
ENV METDATAIO_GIT_NAME develop

#
# METPLOTPY_GIT_NAME is required.
#
RUN if [ "x${METPLOTPY_GIT_NAME}" = "x" ]; then \
echo "ERROR: METPLOTPY_GIT_NAME undefined! Rebuild with \"--build-arg METPLOTPY_GIT_NAME={branch, tag, or hash}\""; \
exit 1; \
else \
echo "Build Argument METPLOTPY_GIT_NAME=${METPLOTPY_GIT_NAME}"; \
fi
RUN echo "Build Argument METVIEWER_GIT_NAME=${METVIEWER_GIT_NAME}"; \
&& echo "Build Argument METPLOTPY_GIT_NAME=${METPLOTPY_GIT_NAME}"; \
&& echo "Build Argument METCALCPY_GIT_NAME=${METCALCPY_GIT_NAME}"; \
&& echo "Build Argument METDATAIO_GIT_NAME=${METDATAIO_GIT_NAME}";

#
# METDATAIO_GIT_NAME is required.
# Constants
#
RUN if [ "x${METDATAIO_GIT_NAME}" = "x" ]; then \
echo "ERROR: METDATAIO_GIT_NAME undefined! Rebuild with \"--build-arg METDATAIO_GIT_NAME={branch, tag, or hash}\""; \
exit 1; \
else \
echo "Build Argument METDATAIO_GIT_NAME=${METDATAIO_GIT_NAME}"; \
fi
ENV TOMCAT_MINOR_VERSION 5.61
ENV TOMCAT_MAJOR_VERSION 8
ENV TOMCAT_VERSION ${TOMCAT_MAJOR_VERSION}.${TOMCAT_MINOR_VERSION}

#
# Install system updates
Expand Down

0 comments on commit 36d8db1

Please sign in to comment.