Docker compose seed operation fails
Bug Description
The seed
command provided in the installation part of the README fails
Step to Reproduce
Follow the docker-compose instructions on a fresh install until the following command
docker exec debian-image-finder flask seed run
It results in a sqlalchemy error. The interesting parts are:
...
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "images_ref_key"
DETAIL: Key (ref)=(ami-0bd39b3c604509b74) already exists.
...
DETAIL: Key (ref)=(ami-0bd39b3c604509b74) already exists.
[SQL: INSERT INTO images (arch, release, img_type, vendor, version, region, artifact_url, ref, packages, created_at, provider_id) VALUES (%(arch)s, %(release)s, %(img_type)s, %(vendor)s, %(version)s, %(region)s, %(artifact_url)s, %(ref)s, %(packages)s, %(created_at)s, %(provider_id)s) RETURNING images.id]
[parameters: {'arch': 'arm64', 'release': 'sid', 'img_type': 'release', 'vendor': 'ec2', 'version': '398', 'region': 'ca-central-1', 'artifact_url': 'https://console.aws.amazon.com/ec2/v2/home?region=ca-central-1#launchAmi=ami-0bd39b3c604509b74', 'ref': 'ami-0bd39b3c604509b74', 'packages': 'adduser: 3.118, apparmor: 2.13.2-10', 'created_at': '2019-05-19 16:41:18', 'provider_id': '1'}]
...
The complete log is [here](http://paste.debian.net/hidden/93596cef/)
Your Environment
$ uname -a
Linux rfac01 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
$ cat /etc/debian_version
10.4
$ docker -v
Docker version 18.09.1, build 4c52b90
Edited by alban