ttl.sh icon indicating copy to clipboard operation
ttl.sh copied to clipboard

uuidgen on macOS creates upper case uuid

Open philips opened this issue 2 years ago • 1 comments

See the error from docker:

export IMAGE_NAME=$(uuidgen)
$ docker build -t ttl.sh/${IMAGE_NAME}:1h .
invalid argument "ttl.sh/A028C747-D344-4B85-AF58-FC59A321788D:1h" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
$ docker version
Docker version 20.10.10, build b485636f4b

Suggestion to make the frontpage of ttl.sh say:

export IMAGE_NAME=$(uuidgen | tr '[:upper:]' '[:lower:]')

philips avatar Nov 14 '21 05:11 philips

Hi @philips, you can convert all letters to lowercase in macOS.

{
    IMAGE_NAME=$(uuidgen | tr "[:upper:]" "[:lower:]")
    docker image build -t ttl.sh/${IMAGE_NAME}:1h .
    docker image push ttl.sh/${IMAGE_NAME}:1h
}

You can also create an alias if you want to keep this behavior permanent in your machine.

uuidgen='uuidgen | tr "[:upper:]" "[:lower:]"'

mmorejon avatar Jan 27 '22 10:01 mmorejon