Skip to content

Container fails to run commands #243

Description

@chrkr

The container fails to run any command given with docker run (for any command other than the default postgres command):

$ docker run --rm pgautoupgrade/pgautoupgrade:18.4-debian ls
************************************
PostgreSQL data directory: /var/lib/postgresql/18/docker
************************************
/usr/local/bin/postgres-docker-entrypoint.sh: line 415: [: -eq: unary operator expected
/usr/local/bin/postgres-docker-entrypoint.sh: line 429: [: : integer expression expected
/usr/local/bin/postgres-docker-entrypoint.sh: line 432: [: : integer expression expected
/usr/local/bin/postgres-docker-entrypoint.sh: line 435: [: : integer expression expected
/usr/local/bin/postgres-docker-entrypoint.sh: line 438: [: : integer expression expected
/usr/local/bin/postgres-docker-entrypoint.sh: line 441: [: : integer expression expected
****************************************************************************
Unrecognised version of PostgreSQL database files found, aborting completely
****************************************************************************

It seems to mostly come from some variables not being set at all earlier in the script when the command is not postgres.

This issue prevents the container from being used as a full drop-in replacement for the regular postgres container.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions