Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Unable to build complement-synapse Docker image #13319

@uhoreg

Description

@uhoreg

I tried to build the complement-synapse image, as described in docker/README-testing.md, but when I ran docker build -t complement-synapse -f docker/complement/Dockerfile docker/complement, it failed, saying:

...
Step 4/21 : RUN echo "ALTER USER postgres PASSWORD 'somesecret'" | gosu postgres postgres --single
 ---> Running in cbf9ce044882
postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
The command '/bin/sh -c echo "ALTER USER postgres PASSWORD 'somesecret'" | gosu postgres postgres --single' returned a non-zero code: 1

It appears that it did not persist the changes to /var/lib/postgresql/data that were made in the previous Dockerfile step did not get persisted, and so /var/lib/postgresql/data remains empty. This seems to be because /var/lib/postgresql/data is marked as a VOLUME in the postgres image, which means that changes to that directory are discarded.

If I combine the three RUN statements in the postgres section of the Dockerfile into a single line, then the build "succeeds", but of course the /var/lib/postgresql/data directory is still empty in the resulting image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Docsthings relating to the documentationT-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions