quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

Custom docker image for devservices #29533

Closed sokimaaa closed 1 year ago

sokimaaa commented 1 year ago

Description

I've been trying to create a postgres docker image with a new extensions and use it in devservices instead of default one.

How can I do this?
I tried to use quarkus.datasource.devservices.image-name for specifying a custom image, but I had failed.

Perhaps, It's because quarkus doesn't know where to find a custom image, so I didn't find a way to specify it.

Implementation ideas

Possibly, add a way for specifying a location of custom images.

quarkus-bot[bot] commented 1 year ago

/cc @geoand, @stuartwdouglas

geoand commented 1 year ago

So you've created a new extension and want to create a Dev Service for it?

sokimaaa commented 1 year ago

I created a new extended postgres image and want to use it instead of default in devservices

geoand commented 1 year ago

What does not work if you use quarkus.datasource.devservices.image-name=...?

sokimaaa commented 1 year ago

Uses old one image, not that I specified

gsmet commented 1 year ago

I just ran mvn clean quarkus:dev -Dquarkus.datasource.devservices.image-name=postgres:10 for the hibernate-orm-quickstart and it downloads postgres:10 instead of postgres:14 so it seems to be working as expected.

If it doesn't work for you, we will need a way to reproduce it.

sokimaaa commented 1 year ago

Seems, I resolved an issue, thx.

I noticed that I can't change image at all, and this property like ignored for me.

My application.properties

quarkus.datasource.devservice.enabled=true
quarkus.datasource.devservice.image-name=postgres:10

But, was created container with version postgres:14, when I changed to

quarkus.datasource."name".devservice.enabled=true
quarkus.datasource."name".devservice.image-name=postgres:10

Issue was resolved for me.

stuartwdouglas commented 1 year ago

Looks like a typo in the property name? You have devservice not devservices in your property names.