Docker Community Forums

Share and learn in the Docker community.

Why do I see "UNIQUE constraint failed"


(Mickt) #1

I’m new to docker so this may be a newbie issue.

I have a local registry:

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

faf7631959cd registry:latest “docker-registry” 43 minutes ago Up 43 minutes 0.0.0.0:5000->5000/tcp registry

I see the following error:
The push refers to a repository [localhost:5000/openstack-linux-base] (len: 1)
Sending image list
FATA[0004]

The log shows the following:

IntegrityError: (IntegrityError) UNIQUE constraint failed: repository.name u’INSERT INTO repository (name, description) VALUES (?, ?)’ (‘library/linux’, ‘’)
172.17.42.1 - - [12/May/2015:15:49:33 +0000] “PUT /v1/repositories/openstack-linux-base/ HTTP/1.1” 500 291 “-” “docker/1.5.0 go/go1.3.3 kernel/3.8.13-55.1.6.el7uek.x86_64 os/linux arch/amd64”