Skip to content

docs: alias instruction on installation using docker not working when directory has a space #3794

@agung2001

Description

@agung2001

on installation guide: https://github.com/phpDocumentor/phpDocumentor/blob/master/docs/getting-started/installing.rst
there's an installation guide using the docker

$ alias phpdoc="docker run --rm -v $(pwd):/data phpdoc/phpdoc:3"

that command will not work if the current path has space such as /Users/user/Local Sites/
this directory is created by default when developing a WordPress site using https://localwp.com/

Expected behavior

The installation guide is expected to have the correct command guide

Actual behavior

Using that alias will result

docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.

on a directory that has a space

This can easily be fixed by adding a single quote such as this

$ alias phpdoc="docker run --rm -v '$(pwd):/data' phpdoc/phpdoc:3"

Steps to reproduce the problem

  1. Add phpdoc alias alias phpdoc="docker run --rm -v $(pwd):/data phpdoc/phpdoc:3" to your .zshrc
  2. Run phpdoc --version on a directory that has a space
  3. FAILED: it'll show
docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.

Your environment

  • Version used: phpDocumentor v3.4.2-v3.5.3+10b8a76
  • Install method: Docker
  • PHP version: default using docker
  • Operating system and version (e.g. Ubuntu 20.04, Windows 10): MacOS Sonoma 14.5
  • Link to your project: local project has no link
  • Attach code that is involved: no custom code involved

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions