Reputation: 622
When I try to build my container I receive the following error:
docker-php-source: not found
the code is :
RUN docker-php-source extract \
&& curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/3.0.0.tar.gz \
&& tar xfz /tmp/redis.tar.gz \
&& rm -r /tmp/redis.tar.gz \
&& mv phpredis-3.0.0 /usr/src/php/ext/redis \
&& sed -i '$ a redis' /usr/src/php-available-exts \
&& docker-php-ext-install redis \
&& docker-php-source delete
Upvotes: 1
Views: 2069
Reputation: 1633
I had this error occur when I checked out a Dockerfile on windows with windows line endings, converting to unix line endings fixed for me.
If you are using git, look for the "autocrlf" config option under git: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
I ran: git config --global core.autocrlf input
which means it will always checkout repos with line endings unchanged, but then always commit unix style line endings. Check the git docs to find the right option for you.
Upvotes: 1