orlangure/gnomock

Feature: Configurable Docker Registry URL

Opened this issue · 3 comments

Hi All,

Just wondering if you guys have planned to have a docker registry URL? Due to the maximum limits of pulling from docker host, it would be nice if we can configure it with our own cached registry instead of directly accessing it from docker hub

Thanks!

Hi @andrewggg1 and sorry for taking so long to address this.

Right now there is no "concept" of a registry, because every preset defines its own image which includes docker registry URL. Some images are already not hosted on docker.io (like mssql).

As a quick workaround, before anybody gets to work on this issue, I can suggest writing a wrapper Preset for whatever presets you require in tests, and implementing Image method to return your custom registry hosted image. It's very little code, and you will still enjoy all the new features of the wrapped presets if ever added.

As a more generic solution, I only can think of using some string manipulation magic that replaces docker.io or any other registry host name by the provided URL from a new Options function. It would be the users' job to verify that the provided registry actually hosts the requested image.

I'm out of capacity in the near future to work on this, but I am available to review code and release a new version if you or anybody else is willing to take on the generic solution part. Would you like to work on this?

what should I do if I don`t want to use docker,but use the client itself? just skip start function?

Hi @mingmingshiliyu, sorry, I don't understand the question. Which client do you want to use?