Skip to content

Commit

Permalink
Merge pull request DSpace#8974 from tdonohue/docker_version_fixes
Browse files Browse the repository at this point in the history
Replace all old Docker "dspace-7_x" tags with "latest" on main
  • Loading branch information
tdonohue authored Jul 24, 2023
2 parents 33a9a0d + c004a33 commit e8d78a5
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 28 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This image will be published as dspace/dspace
# See https://github.com/DSpace/DSpace/tree/main/dspace/src/main/docker for usage details
#
# - note: default tag for branch: dspace/dspace: dspace/dspace:dspace-7_x
# - note: default tag for branch: dspace/dspace: dspace/dspace:latest

# This Dockerfile uses JDK11 by default, but has also been tested with JDK17.
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
ARG DSPACE_VERSION=latest

# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM dspace/dspace-dependencies:${DSPACE_VERSION} as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.cli
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This image will be published as dspace/dspace-cli
# See https://github.com/DSpace/DSpace/tree/main/dspace/src/main/docker for usage details
#
# - note: default tag for branch: dspace/dspace-cli: dspace/dspace-cli:dspace-7_x
# - note: default tag for branch: dspace/dspace-cli: dspace/dspace-cli:latest

# This Dockerfile uses JDK11 by default, but has also been tested with JDK17.
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
ARG DSPACE_VERSION=latest

# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM dspace/dspace-dependencies:${DSPACE_VERSION} as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# This image will be published as dspace/dspace
# See https://github.com/DSpace/DSpace/tree/main/dspace/src/main/docker for usage details
#
# - note: default tag for branch: dspace/dspace: dspace/dspace:dspace-7_x-test
# - note: default tag for branch: dspace/dspace: dspace/dspace:latest-test
#
# This image is meant for TESTING/DEVELOPMENT ONLY as it deploys the old v6 REST API under HTTP (not HTTPS)

# This Dockerfile uses JDK11 by default, but has also been tested with JDK17.
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
ARG DSPACE_VERSION=latest

# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM dspace/dspace-dependencies:${DSPACE_VERSION} as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
dspace-cli:
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-latest}"
container_name: dspace-cli
build:
context: .
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
# proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests
# from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above.
proxies__P__trusted__P__ipranges: '172.23.0'
image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-7_x-test}"
image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-latest-test}"
build:
context: .
dockerfile: Dockerfile.test
Expand Down Expand Up @@ -66,7 +66,7 @@ services:
dspacedb:
container_name: dspacedb
# Uses a custom Postgres image with pgcrypto installed
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-7_x}"
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}"
build:
# Must build out of subdirectory to have access to install script for pgcrypto
context: ./dspace/src/main/docker/dspace-postgres-pgcrypto/
Expand All @@ -86,7 +86,7 @@ services:
# DSpace Solr container
dspacesolr:
container_name: dspacesolr
image: "${DOCKER_OWNER:-dspace}/dspace-solr:${DSPACE_VER:-dspace-7_x}"
image: "${DOCKER_OWNER:-dspace}/dspace-solr:${DSPACE_VER:-latest}"
build:
context: .
dockerfile: ./dspace/src/main/docker/dspace-solr/Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions dspace/src/main/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ Here's how to fix those issues by migrating your old Postgres data to the new ve
* Pull down an older version of the image from Dockerhub (using a tag)
* Or, temporarily rebuild your local image with the old version of Postgres. For example:
```
# This command will rebuild using PostgreSQL v11 & tag it locally as "dspace-7_x"
docker build --build-arg POSTGRES_VERSION=11 -t dspace/dspace-postgres-pgcrypto:dspace-7_x ./dspace/src/main/docker/dspace-postgres-pgcrypto/
# This command will rebuild using PostgreSQL v11 & tag it locally as "latest"
docker build --build-arg POSTGRES_VERSION=11 -t dspace/dspace-postgres-pgcrypto:latest ./dspace/src/main/docker/dspace-postgres-pgcrypto/
# Then restart container with that image
docker-compose -p d7 up -d
```
Expand Down
2 changes: 1 addition & 1 deletion dspace/src/main/docker-compose/db.entities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version: "3.7"

services:
dspacedb:
image: dspace/dspace-postgres-pgcrypto:dspace-7_x-loadsql
image: dspace/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}-loadsql
environment:
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql
Expand Down
2 changes: 1 addition & 1 deletion dspace/src/main/docker-compose/db.restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ version: "3.7"
# This can be used to restore a "dspacedb" container from a pg_dump, or during upgrade to a new version of PostgreSQL.
services:
dspacedb:
image: dspace/dspace-postgres-pgcrypto:dspace-7_x-loadsql
image: dspace/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}-loadsql
environment:
# Location where the dump SQL file will be available on the running container
- LOCALSQL=/tmp/pgdump.sql
Expand Down
2 changes: 1 addition & 1 deletion dspace/src/main/docker-compose/docker-compose-angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
DSPACE_REST_HOST: localhost
DSPACE_REST_PORT: 8080
DSPACE_REST_NAMESPACE: /server
image: dspace/dspace-angular:dspace-7_x
image: dspace/dspace-angular:${DSPACE_VER:-latest}
networks:
dspacenet:
ports:
Expand Down
26 changes: 13 additions & 13 deletions dspace/src/main/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Caching these Maven dependencies provides a speed increase to all later builds b
are only downloaded once.

```
docker build -t dspace/dspace-dependencies:dspace-7_x -f Dockerfile.dependencies .
docker build -t dspace/dspace-dependencies:latest -f Dockerfile.dependencies .
```

This image is built *automatically* after each commit is made to the `main` branch.
Expand All @@ -25,7 +25,7 @@ A corresponding image exists for DSpace 4-6.

Admins to our DockerHub repo can manually publish with the following command.
```
docker push dspace/dspace-dependencies:dspace-7_x
docker push dspace/dspace-dependencies:latest
```

## Dockerfile.test (in root folder)
Expand All @@ -37,7 +37,7 @@ This image deploys two DSpace webapps to Tomcat running in Docker:
This image also sets up debugging in Tomcat for development.

```
docker build -t dspace/dspace:dspace-7_x-test -f Dockerfile.test .
docker build -t dspace/dspace:latest-test -f Dockerfile.test .
```

This image is built *automatically* after each commit is made to the `main` branch.
Expand All @@ -46,7 +46,7 @@ A corresponding image exists for DSpace 4-6.

Admins to our DockerHub repo can manually publish with the following command.
```
docker push dspace/dspace:dspace-7_x-test
docker push dspace/dspace:latest-test
```

## Dockerfile (in root folder)
Expand All @@ -56,7 +56,7 @@ This image deploys one DSpace webapp to Tomcat running in Docker:
1. The DSpace 7 REST API (at `http://localhost:8080/server`)

```
docker build -t dspace/dspace:dspace-7_x -f Dockerfile .
docker build -t dspace/dspace:latest -f Dockerfile .
```

This image is built *automatically* after each commit is made to the `main` branch.
Expand All @@ -65,14 +65,14 @@ A corresponding image exists for DSpace 4-6.

Admins to our DockerHub repo can publish with the following command.
```
docker push dspace/dspace:dspace-7_x
docker push dspace/dspace:latest
```

## Dockerfile.cli (in root folder)

This Dockerfile builds a DSpace 7 CLI (command line interface) image, which can be used to run DSpace's commandline tools via Docker.
```
docker build -t dspace/dspace-cli:dspace-7_x -f Dockerfile.cli .
docker build -t dspace/dspace-cli:latest -f Dockerfile.cli .
```

This image is built *automatically* after each commit is made to the `main` branch.
Expand All @@ -81,7 +81,7 @@ A corresponding image exists for DSpace 6.

Admins to our DockerHub repo can publish with the following command.
```
docker push dspace/dspace-cli:dspace-7_x
docker push dspace/dspace-cli:latest
```

## ./dspace-postgres-pgcrypto/Dockerfile
Expand All @@ -92,20 +92,20 @@ This image is built *automatically* after each commit is made to the `main` bran
How to build manually:
```
cd dspace/src/main/docker/dspace-postgres-pgcrypto
docker build -t dspace/dspace-postgres-pgcrypto:dspace-7_x .
docker build -t dspace/dspace-postgres-pgcrypto:latest .
```

It is also possible to change the version of PostgreSQL or the PostgreSQL user's password during the build:
```
cd dspace/src/main/docker/dspace-postgres-pgcrypto
docker build -t dspace/dspace-postgres-pgcrypto:dspace-7_x --build-arg POSTGRES_VERSION=11 --build-arg POSTGRES_PASSWORD=mypass .
docker build -t dspace/dspace-postgres-pgcrypto:latest --build-arg POSTGRES_VERSION=11 --build-arg POSTGRES_PASSWORD=mypass .
```

A copy of this file exists in the DSpace 6 branch. A specialized version of this file exists for DSpace 4 in DSpace-Docker-Images.

Admins to our DockerHub repo can (manually) publish with the following command.
```
docker push dspace/dspace-postgres-pgcrypto:dspace-7_x
docker push dspace/dspace-postgres-pgcrypto:latest
```

## ./dspace-postgres-pgcrypto-curl/Dockerfile
Expand All @@ -118,7 +118,7 @@ This image is built *automatically* after each commit is made to the `main` bran
How to build manually:
```
cd dspace/src/main/docker/dspace-postgres-pgcrypto-curl
docker build -t dspace/dspace-postgres-pgcrypto:dspace-7_x-loadsql .
docker build -t dspace/dspace-postgres-pgcrypto:latest-loadsql .
```

Similar to `dspace-postgres-pgcrypto` above, you can also modify the version of PostgreSQL or the PostgreSQL user's password.
Expand All @@ -128,7 +128,7 @@ A copy of this file exists in the DSpace 6 branch.

Admins to our DockerHub repo can (manually) publish with the following command.
```
docker push dspace/dspace-postgres-pgcrypto:dspace-7_x-loadsql
docker push dspace/dspace-postgres-pgcrypto:latest-loadsql
```

## ./dspace-shibboleth/Dockerfile
Expand Down

0 comments on commit e8d78a5

Please sign in to comment.