Open joshmoore opened 5 years ago
This works on my machine, however there could be a potential build/run order issue. There is a github issue discussing how docker-compose
doesn't support this use case.
The depends_on
option is potential solution, however again, there is a github issue advising against it.
@manics might have more to say on it.
If the main aim is to test prebuilt merge-ci and latest-ci builds we could make it even easier for people by ensuring the containers are already built by devspace, either by
Another advantage is that you could test this using our production OMERO docker-compose.yml files by overriding the images instead of two more docker-compose.yml files for omero-web and omero-server.
If the main aim is to test prebuilt merge-ci and latest-ci builds
I think the main driver was to add the necessary configurability to do everything you proposed in the via the makefile in docker-compose.yml itself. In fact, I could see moving away from the makefile in favor of docker-compose as the standard build mechanism. It also makes for a clear documentation of how everything is to be used.
we could make it even easier for people
I can definitely see having both :merge
and :latest(-ci?)
versions pushed regularly.
instead of two more docker-compose.yml files
Yeah, I'm not overly happy with the degree of cut-n-paste that docker-compose requires in general, but I think there's still value in having these files in the repo, especially if we can get rid of the cut-n-paste in Makefile
. When I'm making changes to omero-{web,server}-docker, I often find myself wanting an in-place docker-compose.yml. (I've had local ones multiple times.)
Note: the only thing this doesn't easily provide is a way to add more environment variables without modifying the docker-compose.yml itself. If you have ideas on how to add that customization, I'd be interested.
I'm still not convinced of the benefit of having a docker-compose.yml file in this repo, but if we're going ahead with it can you look into the potential ordering issue: https://github.com/ome/omero-web-docker/pull/29#issuecomment-496541382 ?
@manics, are you referring to https://stackoverflow.com/a/51425060/56887 ? I tried this:
diff --git a/docker-compose.yml b/docker-compose.yml
index 209f9c1..13d2b9e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -17,10 +17,16 @@ services:
image: ${REPO}/omero-web-standalone:${PREFIX}
build:
context: standalone
+ network: omero
args:
...
+
+networks:
+ default:
+ name: omero
but it would bump our minimum requirement:
$ docker-compose pull
ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.default value Additional properties are not allowed ('name' was unexpected)
services.web.build contains unsupported option: 'network'
I've not run into any ordering issues, i.e. the state of this PR has always worked for me.
Beyond just using make for building a set of paired omero-web and omero-web-standalone images, this allows building within a self-contained docker-compose.yml.
see: https://github.com/openmicroscopy/omero-web-docker/pull/28
Questions:
Testing:
docker-compose up -d
cc: @manics @will-moore