lando / platformsh

The Official Platform.sh Lando Plugin
https://docs.lando.dev/platformsh
GNU General Public License v3.0
6 stars 4 forks source link

Can't pull image from platform registry #169

Open Dadacticiel opened 2 years ago

Dadacticiel commented 2 years ago

Hello, i am trying to run my app running on Platform.sh on my local environnement using lando. It's a standard PHP app with a mysql service.

Installation seemed to work fine but when i run lando start, i always get a 403 Access Denied when trying to get the mysql docker image from docker.registry.platform.sh/mysql-10.6 :

Pulling db (docker.registry.platform.sh/mysql-10.6:)... ERROR: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>JS8QS567S8390106</RequestId><HostId>u9fbTfEefAqmjeaQD3rrUJVFu8ZClG+/5L3S5q9JvO5O8Yt42Gj/QzKb0m8X3xI7eh7kGy12uFY=</HostId></Error>"

I set up an API Token for Platform.sh and a lando SSH key has been automatically added to my Platform.sh account. Does anyone has encounter this error and has a solution ?

aimfeld commented 2 years ago

Same issue here, when specifying mysql 10.6 or redis 7.0 in services.yml, I get the same error. Mysql 10.5 and redis 6.2 works for me though.

artiswilliams commented 1 year ago

I'm experiencing this issue for mariadb 10.6.

thewheat commented 1 year ago

If you're encountering this, try specifying an image with a stable tag as detailed here https://github.com/lando/platformsh/issues/163#issuecomment-1122262912

Update: The stable image can be used by an override in the .lando.yml as described in https://docs.lando.dev/guides/overriding-a-service-version.html. In the case of php 8.0 will look like that:

services:
    app:
        overrides:
            image: docker.registry.platform.sh/php-8.0:stable

Manually trying to pull MySQL 10.6 and Redis 7.0 and if the default tag is latest it does throw a 403 response. Using stable works as shown in the output below

$ docker pull docker.registry.platform.sh/mysql-10.6
Using default tag: latest
Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>MMJ7S9JF75NYHMDH</RequestId><HostId>hlH9R6qHEXgd8InTNHG7NPCWv96I4qfxSAgOueDI90XtOYxn7H853vIUnrJFSuyaRkQW3X0GAMc=</HostId></Error>"

$ docker pull docker.registry.platform.sh/mysql-10.6:stable
stable: Pulling from mysql-10.6
...

$ docker pull docker.registry.platform.sh/redis-7.0
Using default tag: latest
Error response from daemon: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>R6A092FTCT55PG9F</RequestId><HostId>tkEycOT55/HzkHuz697rHwLKTAT+RPycjj2Kw1EWCCXmEYxoJ2R/rnHYhKs0ylTnm/FP13qw8U4=</HostId></Error>"

$ docker pull docker.registry.platform.sh/redis-7.0:stable
stable: Pulling from redis-7.0
2fccf0ed7151: Pulling fs layer
...