1

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?

1 Answer 1

2

Add this to your Dockerfile.

RUN \
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
2
  • 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
    Commented Jan 16, 2018 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
    Commented Jan 16, 2018 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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