Skip to content
Permalink
v2.4.1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit 3b36388 Oct 10, 2022 History
Ignore import/extensions when importing Docker tags JSON
0 contributors

Users who have contributed to this file

18 lines (14 sloc) 610 Bytes
// eslint-disable-next-line import/extensions
import dockerContainerConfig from '../docker/containers.json'
export const UPDATER_IMAGE_NAME = dockerContainerConfig.updater
export const PROXY_IMAGE_NAME = dockerContainerConfig.proxy
const imageNamePattern =
'^(?<repository>(([a-zA-Z0-9._-]+([:[0-9]+[^/]))?([a-zA-Z0-9._/-]+)?))((:[a-zA-Z0-9._/-]+)|(@sha256:[a-zA-Z0-9]{64}))?$'
export function repositoryName(imageName: string): string {
const match = imageName.match(imageNamePattern)
if (match?.groups) {
return match.groups['repository']
} else {
throw Error('invalid image name')
}
}