-
Notifications
You must be signed in to change notification settings - Fork 36
Pull is wrongfully attempted for locally-built image #81
Comments
Hi @ches, thanks for the detailed write-up! There are two settings you should be aware of:
The Let me know if that fixes the issue you are seeing. If not, a reproduction of the project would be very helpful as what you are attempting to do should work. |
Ahhh this is the ticket! I completely overlooked the existence of that setting and hadn't come across the logic yet, my apologies. Indeed the Compose service name and Docker image name are simplified from the project name so this was precisely the issue. A second catch was that sbt/sbt-native-packager#947 was causing And you're right that Thanks again for your quick and helpful responses. |
Hi @kurtkopchik,
This is the issue/question I referred to in #80:
I have a single-module sbt project and a
docker-compose.yml
that runs multiple service containers, one of which being the application image for the project built by sbt-native-packager via sbt-docker-compose. If I remove the application service—leaving only the remotely-published images—and setcomposeNoBuild := true
then I can run the Compose environment through sbt as expected, so my system setup basically works. But with the application service included, its image gets locally built but then the plugin tries to pull it from remote registry instead of recognizing it as local.Here's the relevant output on
dockerComposeUp
when I (successfully) run thebasic-native-packager
example which is closest to my usage:Looks good, built the image and then sbt-docker-compose skipped trying to pull it. But when running for my project, I see this:
So clearly my app image gets built, but then we try to pull it, which shouldn't happen.
(The
invalid character '<' looking for beginning of value
messages come directly from the response from our registry—a poor error message, but it's the result of trying to pull a nonexistent image).Here are the minimized bits of my relevant configs:
(Specific local ports were bound for local development, this will be changed for sbt builds once it's working, don't worry 😄 ).
I'm starting to look over the code for why this might be happening, and I can produce an actual reproduction project if you like (or send one as a PR for the examples directory), but I wanted to make sure I'm not simply misunderstanding something about intended usage. This almost works; it should work, right?
The text was updated successfully, but these errors were encountered: