Open plondon opened 3 years ago
Can I see the full build output? This can sometimes happen due to a transient network error so you may also try building again.
I just tried building from scratch using the snapshot on public ECR:
% make sync-ubuntu
docker pull public.ecr.aws/raxod502/riju:ubuntu
ubuntu: Pulling from raxod502/riju
Digest: sha256:12422a077b96616b59f87c4ed7f0b0c83560eb02dc90653427df48af1c2d5548
Status: Image is up to date for public.ecr.aws/raxod502/riju:ubuntu
public.ecr.aws/raxod502/riju:ubuntu
docker tag public.ecr.aws/raxod502/riju:ubuntu riju:ubuntu
Seems to work on my end.
$ riju git:(master) make image shell I=admin
> docker build . -f docker/admin/Dockerfile -t riju:admin
Okay, firstly, my previous comment was a bit off base, because the admin image isn't actually based on riju:ubuntu
, it's just based directly on ubuntu:rolling
. With that said, I tried again with the latest version from Docker Hub:
% docker pull ubuntu:rolling
[sudo] password for raxod502:
rolling: Pulling from library/ubuntu
d7e10407b4d9: Pull complete
Digest: sha256:d5f1676ce05cd3251b583f19dad1793f9ab499baf463e730e494a640d6c77c2c
Status: Downloaded newer image for ubuntu:rolling
docker.io/library/ubuntu:rolling
Which appears to be the same base image digest that you're using. And yet it still works for me. Here's the full output:
Can you try running a plain ubuntu:rolling
container and running the commands in the install script manually, so that you can perhaps identify what is different about your environment that somehow causes APT to not be able to find these packages even though the relevant repositories are added?
(Are you on a non-AMD processor architecture perhaps? Could that cause this?)
(Are you on a non-AMD processor architecture perhaps? Could that cause this?)
Yeah I'm on an M1 so that is probably the issue :(
I ran the install.bash scripts manually in the CLI for the rolling ubuntu image and failed again on docker-ce-cli with the same error as above E: Unable to locate package
Well, it probably boils down to the fact that APT is detecting you're on ARM and the Docker and Terraform repos don't provide ARM builds. I doubt the issues will stop there, though, since most downloads in general are architecture-specific, and a large chunk of the hundreds of languages supported by Riju involve downloading and installing an architecture-specific binary or tarball.
It may be possible to run cross-architecture images in Docker. If someone can get that working, I'd certainly accept a pull request adjusting the build scripts to pass whatever Docker command-line options are necessary to get it to automatically enable cross-architecture execution when appropriate.
I'll update the issue title now that we have an idea of the root cause.
By providing the platform flag I was able to run the admin shell:
FROM --platform=linux/amd64 ubuntu:rolling
I also needed to downgrade node to 14.x (not sure if this is really related to the M1 issue though.)
node_repo="node_14.x"
But I'm pretty close now. I also opened a PR updating a few things in the selfhosting doc.
Oh, awesome. So, if I understand correctly:
If that's the case then it sounds like all we need to do is explicitly add --platform=linux/amd64
to each FROM
statement in the Dockerfiles, for which I'd be happy to test/merge a pull request.
I also needed to downgrade node to 14.x
Hmm interesting, what error were you getting with Node 16.x?
Hmm interesting, what error were you getting with Node 16.x?
Heap out of memory crash I believe
Odd, I can't think of any reason that would be related to the Node version or processor architecture.
Not sure either, happy to investigate more!
Seems others are experiencing this issue on an M1 as well when targeting --platform=linux/amd64
Oh, yikes. I guess it would be good to document this limitation (and link to the upstream issue).
Hi Radon! Thanks again for this great resource!
I'm having a problem building the admin shell:
make image shell I=admin
It says my ubuntu image is: https://download.docker.com/linux/ubuntu hirsute/stable amd64 Packages
Error: