apollographql / rover

The CLI for Apollo GraphOS
https://rover.apollo.dev
Other
407 stars 85 forks source link

Not working on Docker with an Alpine image running on M1 #2068

Closed matutetandil closed 2 weeks ago

matutetandil commented 3 weeks ago

Description

When trying to Install Rover on Docker using Alpine on an M1 Mac, it doesn't work. (it does work on x86_64)

Steps to reproduce

Create a Dockerfile with this content

FROM node:iron-alpine

RUN apk add curl

RUN curl -sSL https://rover.apollo.dev/nix/latest | sh

The build the image, make sure you are on a Mac M1 (not tested on M2/M3)

Expected result

Rover will be installed

Actual result

docker build -t test .

[+] Building 4.7s (7/7) FINISHED                                                                                                                                                                        docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                                    0.0s
 => => transferring dockerfile: 132B                                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:iron-alpine                                                                                                                                                     1.5s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                                                                                             0.0s
 => [internal] load .dockerignore                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                         0.0s
 => CACHED [1/3] FROM docker.io/library/node:iron-alpine@sha256:1a526b97cace6b4006256570efa1a29cd1fe4b96a5301f8d48e87c5139438a45                                                                                        0.0s
 => [2/3] RUN apk add curl                                                                                                                                                                                              1.6s
 => ERROR [3/3] RUN curl -sSL https://rover.apollo.dev/nix/latest | sh                                                                                                                                                  1.5s 
------                                                                                                                                                                                                                       
 > [3/3] RUN curl -sSL https://rover.apollo.dev/nix/latest | sh:                                                                                                                                                             
0.985 This operating system does not support dynamic linking to glibc.                                                                                                                                                       
0.986 Downloading musl binary that does not include `rover supergraph compose`.                                                                                                                                              
0.988 downloading rover from https://github.com/apollographql/rover/releases/download/v0.26.0/rover-v0.26.0-aarch64-unknown-linux-musl.tar.gz                                                                                
1.510 curl: (22) The requested URL returned error: 404
1.514 failed to download https://github.com/apollographql/rover/releases/download/v0.26.0/rover-v0.26.0-aarch64-unknown-linux-musl.tar.gz
1.515 this may be a standard network error, but it may also indicate
1.516 that rover's release process is not working. When in doubt
1.517 please feel free to open an issue!
1.518 https://github.com/apollographql/rover/issues/new/choose
------
Dockerfile:5
--------------------
   3 |     RUN apk add curl
   4 |     
   5 | >>> RUN curl -sSL https://rover.apollo.dev/nix/latest | sh
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sSL https://rover.apollo.dev/nix/latest | sh" did not complete successfully: exit code: 1

Environment

matutetandil commented 3 weeks ago

As a workaround, I changed the image to node:iron based on Debian, and it worked... however, it would be great if an image for Alpine is available.

loshz commented 2 weeks ago

Hi @matutetandil - thanks for filing this issue! I've been able to replicate this locally and have potentially identified the issue. I'll discuss this internally and report back when we have a fix.

loshz commented 2 weeks ago

Hi @matutetandil - after looking into this and discussing with the team, we've decided this is an edgecase we don't currently support. As it stands, we don't ship binaries for aarch64-unknown-linux-musl. However, we are working on broadening our binary releases and may offer support in the future.

In the meantime, I've added a check to our install script to alert users of this: https://github.com/apollographql/rover/pull/2079

matutetandil commented 2 weeks ago

hey @loshz Awesome!!!

thank you for your comments!!!