pygmystack / pygmy

the pygmy stack is a container stack for local development
MIT License
25 stars 12 forks source link

Allow users to override default service images in .pygmy.yml #458

Closed tobybellwood closed 10 months ago

tobybellwood commented 1 year ago

To allow local customisation, and facilitate easier testing, you should be able to define the image for a built-in service in the .pygmy.yml file (as you can for external services).

This would allow easier testing in the image repos etc

e.g.

services:
  amazeeio-haproxy:
    image: ghcr.io/pygmystack/haproxy:pr-12
  amazeeio-ssh-agent:
    image: ghcr.io/pygmystack/ssh-agent:pr-2
  amazeeio-dnsmasq:
    image: ghcr.io/pygmystack/dnsmasq:pr-2
  amazeeio-mailhog:
    image: ghcr.io/pygmystack/mailhog:pr-3
tobybellwood commented 1 year ago

Additionally, it doesn't appear that pygmy can easily handle pulling images that aren't present locally (same result without ghcr.io prefix)?

Screenshot from 2023-05-30 11-48-36

tobybellwood commented 1 year ago

Additionally, it doesn't appear that pygmy can easily handle pulling images that aren't present locally (same result without ghcr.io prefix)?

Turns out this was an issue with some greedy regex in the DockerPull routine - i've fixed it in a test branch, but will PR.

fubarhouse commented 1 year ago

I've now got a working version of this, though I'm not completely happy with the implementation.

I'll clean it up soon and open a PR. :+1:

tobybellwood commented 1 year ago

Ooh nice! I'll take a look when you're done and we can get test suites into the images too!

fubarhouse commented 1 year ago

469 Resolves this one if you want to give it a test 😄

tobybellwood commented 1 year ago

Looks good, but haven't tested myself - only comment is that I'd use the :main images instead of the pr- ones

fubarhouse commented 1 year ago

Happy to merge #469?

fubarhouse commented 10 months ago

Still interested in this one @tobybellwood? I'm good to merge on your approval.