I have a Magento 1.7 version running on a container, and I would like to use n98-magerun.

How can install n98-magerun when using a Dockerfile and not docker-compose?


Add this to your Dockerfile.

curl -sS -o n98-magerun.phar https://files.magerun.net/n98-magerun.phar &&  \
curl -sS -o n98-magerun.phar.sha256 https://files.magerun.net/sha256.php?file=n98-magerun.phar && \
shasum -a 256 -c n98-magerun.phar.sha256 && \
chmod +x n98-magerun.phar && \
mv n98-magerun.phar /usr/local/bin/n98-magerun.phar
  • Can you please explain why you're downloading the sha256 because I got it to work (thank you!!!) without downloading it? I ran into issues because I couldn't use [-a] on my CentOS. – mikemols Jan 16 '18 at 13:50
  • This is only a security feature to verify that the phar file is valid and not a replaced phar file by a man in the middle attack. For a Mac you can use "gsha256sum". – cmuench Jan 16 '18 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.