mirror of https://github.com/docker/docker-py.git
fix: tag regex should allow ports
Closes: https://github.com/docker/docker-py/issues/3195 Related: https://github.com/opencontainers/distribution-spec/pull/498 Signed-off-by: Sven Kieske <kieske@osism.tech>
This commit is contained in:
parent
7d8a161b12
commit
007a95c2e3
|
|
@ -10,8 +10,9 @@ from ..constants import IS_WINDOWS_PLATFORM
|
|||
|
||||
_SEP = re.compile('/|\\\\') if IS_WINDOWS_PLATFORM else re.compile('/')
|
||||
_TAG = re.compile(
|
||||
r"^[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(\/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*" \
|
||||
+ "(:[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127})?$"
|
||||
r"^[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*" \
|
||||
+ "(?::[0-9]+)?(/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*" \
|
||||
+ "(:[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127})?$"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue