Introduce extrahosts parameter for building an image#1340
Introduce extrahosts parameter for building an image#1340KostyaSha merged 2 commits intodocker-java:masterfrom
Conversation
| if (this.extraHosts == null) { | ||
| this.extraHosts = new HashSet<>(); | ||
| } | ||
| this.extraHosts.add(extraHost); |
There was a problem hiding this comment.
The method parameter extraHost is of type String we will want to add to a Set of Strings. Can you elaborate? I don't think I understand your comment.
There was a problem hiding this comment.
It would be good to keep transparent with as setter withExtraHosts(Set<String>), better add additional method addExtraHost(String) if it really needed
There was a problem hiding this comment.
I orientated myself on this method for buildArgs: https://github.com/docker-java/docker-java/blob/master/docker-java-api/src/main/java/com/github/dockerjava/api/command/BuildImageCmd.java#L193. Granted, it's a Map but that doesn't really matter too much. Would you be opposed with keeping the method I introduced and then add another one for providing a Set?
There was a problem hiding this comment.
Never mind, misread your comment. Will make that change.
There was a problem hiding this comment.
Made the change. Decided to only expose a method for a Set<String>.
|
Thanks for merging and releasing! |
For more information, see #1339.
This change is