To accommodate upstream changes to the Docker Library Postgres images that we extend in our circleci/postgres
Docker Hub repository, we are removing hardcoded references to a POSTGRES_USER
in the Dockerfiles for our Postgres images.
For further context, from @FelicianoTech’s earlier post:
The Problem
Most of the CircleCI Docker Convenience Images are small CI tweaks we apply to the upstream Docker Library images. So the
circleci/postgres
image is based on thepostgres
image.4 days ago the upstream maintainers made a small tweak to the image so that the
postgres
role/user is only created when thePOSTGRES_USER
is not set. So of course, we set it toroot
. This has causedcircleci/postgres
images built within the last few days to no longer have thepostgres
role.
Thus, to avoid further confusion, we have removed the root
user entirely. Once this publish_postgres
job completes, the postgres
role/user should again be created automatically in our Postgres images—or you can use @FelicianoTech’s second solution from the previously mentioned post:
Set the
POSTGRES_USER
environment variable in your CircleCI config topostgres
and you’ll get the role back in the image as it was before. This would be done something like this:- image: circleci/postgres:9.6-alpine environment: POSTGRES_USER: postgres
In the longer-term, we plan to build these images entirely from scratch, to avoid the mutability of extending a community image.