-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Per #1546, added Dockerfile that copies local MET source code into Do…
…cker image instead of cloning the repository
- Loading branch information
1 parent
d07fcb0
commit 5cd2afb
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
ARG MET_BASE_IMAGE=minimum | ||
|
||
FROM dtcenter/met-base:${MET_BASE_IMAGE} | ||
MAINTAINER John Halley Gotway <[email protected]> | ||
|
||
# | ||
# This Dockerfile checks out MET from GitHub and compiles the specified branch or tag from source. | ||
# | ||
ARG SOURCE_BRANCH | ||
|
||
# | ||
# SOURCE_BRANCH is not defined when built via Docker Hub. | ||
# | ||
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 | ||
|
||
ENV MET_GIT_NAME ${SOURCE_BRANCH} | ||
ENV MET_GIT_URL https://github.com/dtcenter/MET | ||
ENV MET_DEVELOPMENT true | ||
|
||
# | ||
# Set the working directory. | ||
# | ||
WORKDIR /met | ||
|
||
# | ||
# Download and install MET and GhostScript fonts. | ||
# Delete the MET source code for tagged releases matching "v"*. | ||
# | ||
RUN echo "Copying MET into /met/MET-${MET_GIT_NAME}" \ | ||
&& mkdir -p /met/MET-${MET_GIT_NAME} | ||
|
||
COPY . /met/MET-${MET_GIT_NAME} | ||
|
||
RUN if [ ! -e "/met/MET-${MET_GIT_NAME}/met/configure.ac" ]; then \ | ||
echo "ERROR: docker build must be run from the MET directory"; \ | ||
exit 1; \ | ||
fi | ||
|
||
RUN cd /met/MET-${MET_GIT_NAME}/met \ | ||
&& ./scripts/docker/build_met_docker.sh |