codecasts / php-alpine

PHP APK Repository for Alpine Linux
https://github.com/codecasts/php-alpine
483 stars 58 forks source link

Not installing from this repo but from Alpine Community #80

Closed georgeboot closed 5 years ago

georgeboot commented 5 years ago

When I follow the instructions of the docs, it won't install the package provided by this repo, but rather the version from the community repo.

From my clean alpine 3.9 install (with main and community enabled):

curl https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub -o /etc/apk/keys/php-alpine.rsa.pub

echo "https://dl.bintray.com/php-alpine/v3.9/php-7.3" >> /etc/apk/repositories

apk add --update php-cli

A quick php -v tells me it installed 7.2:

php -v
PHP 7.2.18 (cli) (built: May  4 2019 16:25:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Also, apk confirms this when I run apk policy php7:

php7 policy:
  7.2.18-r0:
    lib/apk/db/installed
    http://dl-cdn.alpinelinux.org/alpine/v3.9/community
  7.3.5-r1:
    https://dl.bintray.com/php-alpine/v3.9/php-7.3
  7.3.3-r1:
    https://dl.bintray.com/php-alpine/v3.9/php-7.3
  7.3.2-r1:
    https://dl.bintray.com/php-alpine/v3.9/php-7.3

What am I doing wrong?

georgeboot commented 5 years ago

It turns out I was installing php-cli and that package is not provided by this repo. Thus, it forced all the other packages to use the alpine repo instead.