spotify / dockerfile-maven

MATURE: A set of Maven tools for dealing with Dockerfiles
Apache License 2.0
2.75k stars 493 forks source link

[1.4.12] Private repository with port number not valid anymore #308

Closed mmaeller closed 5 years ago

mmaeller commented 5 years ago

Description

Private repository with port in address invalid.

How to reproduce

https://myrepo:5001/project

What do you expect

Port is a valid part of the repository URL.

What happened instead

Repo name "myrepo:5001/project" must contain only lowercase, numbers, '-', '_' or '.'

See https://github.com/spotify/dockerfile-maven/commit/c0ce28f2050ad558946d394648d8bf70371c1509

buhuan192 commented 5 years ago

only 80 port!

mmaeller commented 5 years ago

@buhuan192 Can you tell us why?

gofman8 commented 5 years ago

https://github.com/mmaeller/dockerfile-maven/commits?author=seamonstr ...

mmaeller commented 5 years ago

I don't get it.

deveth0 commented 5 years ago

@buhuan192 bullshit, this would mean no ssl/tls...

@mmaeller I think @SkySonR just wanted to point out the relevant changes which cause this issue. I completely agree, that this is a must have as most companies I work with also use custom private repositories which might be hosted on the same hostname but different ports.

MatanRubin commented 5 years ago

We're seeing the exact same issue, can't use a private repository with a custom port (which, as said above, is a very common use-case). Looks like the issue can be easily fixed by changing VALID_REPO_REGEX

seamonstr commented 5 years ago

@mmaeller has got a good fix to this in his branch with a PR pending.

buhuan192 commented 5 years ago

String VALID_REPO_REGEX = "^([a-z0-9_.-])+(\\/[a-z0-9_.-]+)*$"; You are right! See if the next version can solve this little problem. Please view the source files:BuildMojo.java

dmonti commented 5 years ago

This bug have appeared in v1.4.11 and still happening in v1.4.12

SlipstreamZA commented 5 years ago

Any idea when the pull request will get merged? Unable to use this with a private repository on a different port at the moment