https://dspace-labs.github.io/DSpace-Docker-Images/
This repository contains an issue list of enhancement ideas.
https://hub.docker.com/u/dspace/
This will reduce the need to retrieve source code from git, if the Dockerfile is already housed at the project root directory.
Currently, our Docker images pull code from GitHub within the Dockerfile.
FROM alpine/git as clone ARG DSPACE_BRANCH=dspace-6_x ENV DSPACE_GIT https://github.com/DSpace/DSpace.git WORKDIR /app RUN git clone ${DSPACE_GIT} \ && cd /app/DSpace \ && git checkout ${DSPACE_BRANCH} COPY local.cfg /app/DSpace COPY build.properties /app/DSpace FROM maven as build WORKDIR /app COPY --from=clone /app/DSpace /app RUN mvn package |
The Docker build command takes a git url as a parameter. See https://docs.docker.com/engine/reference/commandline/build/
Some experimentation is still needed to verify this.
FROM maven as build WORKDIR /app # Add the full source dir into the image ADD * /app/ COPY docker.local.cfg /app/local.cfg # In the DSpace 4/5 build COPY docker.build.properties /app/build.properties |
This will likely require the creation of a .dockerignore file for times when the build is run from a user's desktop
.git/ .idea/ .settings/ */target/ dspace/modules/*/target/ |
Terry has attempted to find another library tech open source project that has granted similar permissions.
Tim Donohue , do you know if one of the other DuraSpace projects has done this?
Automate the creation of DSpace images as the DSpace/DSpace and DSpace/DSpace-Anuglar source code changes.
DockerHub allows you to configure builds based on source branches for a repository.
This is a supported solution.
Description
Repo | Branch/tag | Image Name | Note |
---|---|---|---|
DSpace | dspace-4_x | dspace/dspace:dspace-4_x | Updated on each merge |
dspace-5_x | dspace/dspace:dspace-5_x | Updated on each merge | |
dspace-6_x | dspace/dspace:dspace-6_x | Updated on each merge | |
master | dspace/dspace:master | Updated on each merge | |
PRxxxx | This may not be possible to implement | ||
dspace-6.n | dspace/dspace:dspace-6.n | Triggered on the creation of a new tag | |
dspace-5.n | dspace/dspace:dspace-5.n | Triggered on the creation of a new tag | |
dspace-6.n | dspace/dspace:dspace-4.n | Triggered on the creation of a new tag | |
DSpace-Angular | master | dspace/dspace-angular:master | Updated on each merge |
Requirements
This would likely be a home-grown solution and may not be fully supported.
https://ops.tips/blog/travis-ci-push-docker-image/
Description
Repo | Branch/tag | Image Name | Note |
---|---|---|---|
DSpace | dspace-4_x | dspace/dspace:dspace-4_x | Updated on each successful Travis build |
dspace-5_x | dspace/dspace:dspace-5_x | Updated on each successful Travis build | |
dspace-6_x | dspace/dspace:dspace-6_x | Updated on each successful Travis build | |
master | dspace/dspace:master | Updated on each successful Travis build | |
PRxxxx | dspace/dspace:pr-xxxx | Updated on each successful Travis build | |
dspace-6.n | dspace/dspace:dspace-6.n | Manually created? | |
dspace-5.n | dspace/dspace:dspace-5.n | Manually created? | |
dspace-6.n | dspace/dspace:dspace-4.n | Manually created? | |
DSpace-Angular | master | dspace/dspace-angular:master | Updated on each merge |
Requirements
Currently, 4 users have admin rights to the DSpace Docker registry.
Consider granting image-specific permissions to particular teams.
The existence of published DSpace images might make it easier to host branch-specific DSpace images to facilitate PR testing and pre-release testing.
Currently, server level command line access is required to build and deploy a PR for testing. This often limits the potential pool of testers to the developer community.
If the deployment of a test environment for a PR could be automated, some user testing of PR's could be performed by repository managers and other users who do not have command line access t server resources.