Skip to content

docker-ensure-installed.sh is broken #983

@Sandelinos

Description

@Sandelinos

the docker-ensure-installed.sh script added in #971 to fix #969 does not work.

$ docker run --rm wordpress:latest docker-ensure-installed.sh
/usr/local/bin/docker-ensure-installed.sh: line 4: $1: unbound variable

This is caused by set -u in the first line of the script. Was this not tested at all before merging?

A janky workaround is to give the script some executable that does nothing, like /usr/bin/true as an argument. (You cannot just use an empty string because of the exec "$@" at the end.)

$ docker run --rm wordpress:latest docker-ensure-installed.sh /usr/bin/true
WordPress not found in /var/www/html - copying now...
Complete! WordPress has been successfully copied to /var/www/html
$

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