Skip to content

Sending RUN ["docker-entrypoint.sh", "postgres", "--version"] output to the console during the build #718

Closed
@doraemoncito

Description

@doraemoncito

Apologies if this question has been asked before. Up until version 10.10 you could see the output of the command in a Docker file that inherited from the postgres:10.10-alpine image. E.g. this Dockerfile (cut for brevity):

FROM postgres:10.10-alpine
RUN ["docker-entrypoint.sh", "postgres", "--version"]

would output something like this:

[INFO]  ---> fd92132d5c20
[INFO] Step 10/10 : RUN ["docker-entrypoint.sh", "postgres", "--version"]
[INFO] 
[INFO]  ---> Running in 2a64e24f8df8
[INFO] The files belonging to this database system will be owned by user "postgres".
[INFO] This user must also own the server process.
[INFO] 
[INFO] The database cluster will be initialized with locale "en_US.utf8".
[INFO] The default database encoding has accordingly been set to "UTF8".
[INFO] The default text search configuration will be set to "english".
...

Starting at 10.11 the output no longer appears in the console during the build. . E.g. this Dockerfile (again cut for brevity):

FROM postgres:12-alpine
RUN ["docker-entrypoint.sh", "postgres", "--version"]

Generates this output instead:

[INFO]  ---> 9e1c212f6bcc
[INFO] Step 10/10 : RUN ["docker-entrypoint.sh", "postgres", "--version"]
[INFO] 
[INFO]  ---> Running in aa64abc39508
[INFO] postgres (PostgreSQL) 12.2
[INFO] Removing intermediate container aa64abc39508
[INFO]  ---> e7eeb9d68edc
[INFO] Successfully built e7eeb9d68edc

Is there any way of getting the earlier 10.10 entry point output behaviour in later versions of the Docker image?

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