diff --git a/.github/workflows/build-source-image.yml b/.github/workflows/build-source-image.yml index f673e55..0ebc1c0 100644 --- a/.github/workflows/build-source-image.yml +++ b/.github/workflows/build-source-image.yml @@ -41,9 +41,4 @@ jobs: tags: 'ghcr.io/mlibrary/dspace-containerization/dspace-source:${{ github.event.inputs.source_image_tag }}' file: Dockerfile build-args: | - BACKEND_GITHUB_USER=mlibrary - BACKEND_GITHUB_REPO=DSpace - BACKEND_GITHUB_BRANCH=${{ github.event.inputs.source_image_tag }} - FRONTEND_GITHUB_USER=mlibrary - FRONTEND_GITHUB_REPO=dspace-angular - FRONTEND_GITHUB_BRANCH=${{ github.event.inputs.source_image_tag }} + GITHUB_BRANCH=${{ github.event.inputs.source_image_tag }} diff --git a/Dockerfile b/Dockerfile index 7b3db95..559b2c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,6 @@ FROM ubuntu:20.04 -ARG BACKEND_GITHUB_USER=mlibrary -ARG BACKEND_GITHUB_REPO=dspace -ARG BACKEND_GITHUB_BRANCH=umich - -ARG FRONTEND_GITHUB_USER=mlibrary -ARG FRONTEND_GITHUB_REPO=dspace-angular -ARG FRONTEND_GITHUB_BRANCH=umich +ARG GITHUB_BRANCH=umich RUN apt-get update && \ apt-get -y install --no-install-recommends \ @@ -15,18 +9,14 @@ RUN apt-get update && \ wget \ unzip -ENV BACKEND_GITHUB_USER=${BACKEND_GITHUB_USER} -ENV BACKEND_GITHUB_REPO=${BACKEND_GITHUB_REPO} -ENV BACKEND_GITHUB_BRANCH=${BACKEND_GITHUB_BRANCH} -RUN wget -q https://github.com/${BACKEND_GITHUB_USER}/${BACKEND_GITHUB_REPO}/archive/refs/heads/${BACKEND_GITHUB_BRANCH}.zip && \ - unzip -q /${BACKEND_GITHUB_BRANCH}.zip -d / && \ - rm -rf /${BACKEND_GITHUB_BRANCH}.zip && \ - mv /DSpace-${BACKEND_GITHUB_BRANCH} /DSpace +ENV GITHUB_BRANCH=${GITHUB_BRANCH} + +RUN wget -q https://github.com/mlibrary/dspace/archive/refs/heads/${GITHUB_BRANCH}.zip && \ + unzip -q /${GITHUB_BRANCH}.zip -d / && \ + rm -rf /${GITHUB_BRANCH}.zip && \ + mv /DSpace-${GITHUB_BRANCH} /DSpace -ENV FRONTEND_GITHUB_USER=${FRONTEND_GITHUB_USER} -ENV FRONTEND_GITHUB_REPO=${FRONTEND_GITHUB_REPO} -ENV FRONTEND_GITHUB_BRANCH=${FRONTEND_GITHUB_BRANCH} -RUN wget -q https://github.com/${FRONTEND_GITHUB_USER}/${FRONTEND_GITHUB_REPO}/archive/refs/heads/${FRONTEND_GITHUB_BRANCH}.zip && \ - unzip -q /${FRONTEND_GITHUB_BRANCH}.zip -d / && \ - rm -rf /${FRONTEND_GITHUB_BRANCH}.zip && \ - mv /dspace-angular-${FRONTEND_GITHUB_BRANCH} /dspace-angular +RUN wget -q https://github.com/mlibrary/dspace-angular/archive/refs/heads/${GITHUB_BRANCH}.zip && \ + unzip -q /${GITHUB_BRANCH}.zip -d / && \ + rm -rf /${GITHUB_BRANCH}.zip && \ + mv /dspace-angular-${GITHUB_BRANCH} /dspace-angular diff --git a/README.md b/README.md index db8cd11..0ae301d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ docker compose build ``` NOTES: +Build uses `umich` by default. To build with `issue-working`, use "--build-arg GITHUB_BRANCH=issue-working" + Build uses `dspace-7.6` by default. To build with 7_x, use "--build-arg DSPACE_VERSION=7_x" Build uses `JDK11` by default. To build with JDK17, use "--build-arg JDK_VERSION=17"