Created
November 29, 2017 10:35
-
-
Save helenst/94715a127903daa5a53321c54456afbf to your computer and use it in GitHub Desktop.
Docker build issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
-versionfile: | |
- @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 | |
+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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
+ARG VERSION | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV DJANGO_SETTINGS_MODULE settings.common | |
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/dashboard.gunicorn-config.py /etc/archivematica/dashboard.gunicorn-config.py | |
-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 \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to also include the
docker-compose.qa.yml
in theDEFAULT_COMPOSE_FILE
value:This ensures that the
dev
config is merged in with theqa
config even during build. This is important because theqa
config specifies the image name, whereas thedev
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 thedev
Makefile. Thebuild
target was buildingrdss_archivematica-dashboard
but the other targets were using thearchivematica-dashboard
image, hence the confusion!