Skip to content

Commit a353bf4

Browse files
committed
Fix docker builds
1 parent b480f1d commit a353bf4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.Dockerfiles/master-jupyter-inherit/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ build: $(subst /,_,$(NAME))-build.stamp ## Build docker file. Depending on which
1919

2020
$(subst /,_,$(NAME))-build.stamp: Dockerfile .dockerignore hooks/build ## Target for doing & timestamping the build
2121
touch $@
22-
hooks/build 2>&1 | tee $(subst stamp,log,$@) || rm -rf $@
22+
IMAGE_NAME=$(IMAGE_NAME) hooks/build 2>&1 | tee $(subst stamp,log,$@) || rm -rf $@
2323
docker tag $(NAME) $(NAME):$(GIT_MASTER_HEAD_SHA)
2424
docker tag $(NAME) $(NAME):latest
2525

.Dockerfiles/master-jupyter-inherit/hooks/build

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ git fetch -v --all --depth=9999999 --update-shallow
1515
git tag --list
1616
git branch
1717

18+
echo "Info: value of IMAGE_NAME = ${IMAGE_NAME:-<unset>}"
19+
1820
d_repo='sourceryinstitute/OpenCoarrays'
1921
d_git_remotes=("$(git remote show)")
2022
echo "${#d_git_remotes[@]} git remotes found."
2123
n_remotes=${#d_git_remotes[@]}
2224
if (( n_remotes > 0 )) ; then
2325
echo "Using remote: ${d_git_remotes[0]}"
24-
d_vcs_url="$(git remote -v | awk 'FNR == 1 {print $2}')"
26+
d_vcs_url="$(git remote -v | awk '/origin/ {print $2; exit}')"
2527
fi
2628

2729
if [[ -z "${d_vcs_url:-}" ]]; then
@@ -56,5 +58,5 @@ docker build --build-arg OPENCOARRAYS_VERSION="${opencoarrays_version}" \
5658
--build-arg VCS_VERSION="${d_vcs_describe:-${d_tag}}" \
5759
--rm \
5860
--pull \
59-
-t "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}")}:latest" .
60-
docker tag "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}")}:latest" "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}")}:${d_vcs_tag}"
61+
-t "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}_jupyter")}:latest" .
62+
docker tag "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}_jupyter")}:latest" "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}_jupyter")}:${d_vcs_tag}"

0 commit comments

Comments
 (0)