Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 882539e

Browse files
authored
Ensure the base Docker image is rebuilt when running complement with workers. (#10686)
We now always rebuild the matrixdotorg/synapse image, then build the matrixdotorg/synapse-workers image on top of it.
1 parent 7367473 commit 882539e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

changelog.d/10686.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update `complement.sh` to rebuild the base Docker image when run with workers.

scripts-dev/complement.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,25 @@ if [[ -z "$COMPLEMENT_DIR" ]]; then
3535
echo "Checkout available at 'complement-master'"
3636
fi
3737

38+
# Build the base Synapse image from the local checkout
39+
docker build -t matrixdotorg/synapse -f "docker/Dockerfile" .
40+
3841
# If we're using workers, modify the docker files slightly.
3942
if [[ -n "$WORKERS" ]]; then
40-
BASE_IMAGE=matrixdotorg/synapse-workers
41-
BASE_DOCKERFILE=docker/Dockerfile-workers
43+
# Build the workers docker image (from the base Synapse image).
44+
docker build -t matrixdotorg/synapse-workers -f "docker/Dockerfile-workers" .
45+
4246
export COMPLEMENT_BASE_IMAGE=complement-synapse-workers
4347
COMPLEMENT_DOCKERFILE=SynapseWorkers.Dockerfile
4448
# And provide some more configuration to complement.
4549
export COMPLEMENT_CA=true
4650
export COMPLEMENT_VERSION_CHECK_ITERATIONS=500
4751
else
48-
BASE_IMAGE=matrixdotorg/synapse
49-
BASE_DOCKERFILE=docker/Dockerfile
5052
export COMPLEMENT_BASE_IMAGE=complement-synapse
5153
COMPLEMENT_DOCKERFILE=Synapse.Dockerfile
5254
fi
5355

54-
# Build the base Synapse image from the local checkout
55-
docker build -t $BASE_IMAGE -f "$BASE_DOCKERFILE" .
56-
# Build the Synapse monolith image from Complement, based on the above image we just built
56+
# Build the Complement image from the Synapse image we just built.
5757
docker build -t $COMPLEMENT_BASE_IMAGE -f "$COMPLEMENT_DIR/dockerfiles/$COMPLEMENT_DOCKERFILE" "$COMPLEMENT_DIR/dockerfiles"
5858

5959
cd "$COMPLEMENT_DIR"

0 commit comments

Comments
 (0)