Skip to content

Instantly share code, notes, and snippets.

@helenst helenst/compose.diff
Created Nov 29, 2017

What would you like to do?
Docker build issues
diff --git a/compose/dev/Makefile b/compose/dev/Makefile
index 1bd9b0d..ed8ec0d 100644
--- a/compose/dev/Makefile
+++ b/compose/dev/Makefile
@@ -11,14 +11,8 @@ VERSION = $(shell git describe --tags --always --dirty)
all: destroy bootstrap
docker-compose ps
- @echo "\
- version: ${VERSION}\n\
- agent_code: ${VERSION}" > ../../src/archivematica/src/version.yml
-build: versionfile
- # Specify compose file explicitly, we don't want to build any other container sets
- COMPOSE_FILE=$(DEFAULT_COMPOSE_FILE) docker-compose build
+ COMPOSE_PROJECT=rdss COMPOSE_FILE=$(DEFAULT_COMPOSE_FILE) docker-compose build --build-arg VERSION=v5 archivematica-dashboard
bootstrap: build bootstrap-storage-service bootstrap-dashboard restart-mcp-services
diff --git a/src/dashboard.Dockerfile b/src/dashboard.Dockerfile
index 5dddaae..305c7cd 100644
--- a/src/dashboard.Dockerfile
+++ b/src/dashboard.Dockerfile
@@ -1,5 +1,6 @@
FROM python:2.7
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONPATH /src/dashboard/src/:/src/archivematicaCommon/lib/
@@ -25,7 +26,9 @@ ADD dashboard/src/requirements/ /src/dashboard/src/requirements/
RUN pip install -r /src/dashboard/src/requirements/production.txt -r /src/dashboard/src/requirements/dev.txt
ADD dashboard/ /src/dashboard/
ADD dashboard/install/ /etc/archivematica/
-ADD version.yml /etc/archivematica/version.yml
+RUN (echo "---"; echo "version: $VERSION") \
+ > /etc/archivematica/version.yml
+RUN cat /etc/archivematica/version.yml
RUN set -ex \
&& groupadd --gid 333 --system archivematica \

This comment has been minimized.

Copy link

commented Nov 29, 2017

We need to also include the in the DEFAULT_COMPOSE_FILE value:

-DEFAULT_COMPOSE_FILE = $(shell realpath ../
+DEFAULT_COMPOSE_FILE = $(shell realpath ../$(shell realpath ../

This ensures that the dev config is merged in with the qa config even during build. This is important because the qa config specifies the image name, whereas the dev does not. Without this, docker-compose will use the service name, archivematica-dashboard and append it to the project name, rdss.

So what we've been seeing is due to inconsistency in the inclusion (or not) of the qa config when using the dev Makefile. The build target was building rdss_archivematica-dashboard but the other targets were using the archivematica-dashboard image, hence the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.