MilesChou / docker-phalcon

Dockerized Phalcon
https://hub.docker.com/repository/docker/mileschou/phalcon
MIT License
124 stars 41 forks source link

phalcon: command not found after the install #41

Closed VinceDZiree closed 4 years ago

VinceDZiree commented 4 years ago

I had "phalcon: command not found" after using "sh -c usr/local/bin/docker-phalcon-install-devtools" Had to remove ".php" at line 14 because the file doesn't have it It installs it correctly now.

Jeckerson commented 4 years ago

Confirm, I removed it in latest v3 version of devtools.

MilesChou commented 4 years ago

How about using PHAR?

https://github.com/phalcon/phalcon-devtools#build-phar

VinceDZiree commented 4 years ago

I only tried following "Builded Image included simple script docker-phalcon-install-devtools to install latest release of Phalcon Devtools CLI" in README.md I didn't try using PHAR.

MilesChou commented 4 years ago

Write the script to build PHAR is hard, I think we can follow how to install composer.phar on Dockerfile(see Troubleshooting), here is an example:

COPY --from=phalconphp/devtools /usr/bin/phalcon /usr/bin/phalcon

Alternatively, maybe we should be compatible with the version before v3.4.1, here is an example:

if [ -f /usr/src/phalcon-devtools/phalcon.php ]; then
    ln -sf /usr/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon
else
    ln -sf /usr/src/phalcon-devtools/phalcon /usr/local/bin/phalcon
fi
Jeckerson commented 4 years ago

@MilesChou Your PR released in 3.4.9.

MilesChou commented 4 years ago

@Jeckerson Can you create a repo on Docker Hub for build the devtools image?

MilesChou commented 4 years ago

37 no longer support old version, accept PR.