Closed eubwxidc closed 6 years ago
Because the docker image is x86. Build the image yourself, perhaps using armhf/alpine as base and it may run.
Thanks for the reply. I've never created a docker image before. Would you be able to assist?
You should be able to literally replace the base in the dockerfile, and build using docker build .
Did you get this to work? I do think having some easy way to deploy pb on arm hardware is valuable, so I'm interested in "officially" supporting this.
I honestly have no clue how to use docker or "replace the base". But I'll have some time tomorrow so I'll look into it and give it a try. I would love to get this setup on the pi on my home network.
@eubwxidc essentially just replace this line with one of the recommended ones: https://github.com/ptpb/pb/blob/master/Dockerfile#L1
I did a manual arm64v8
build (the same architecture used on the rpi3) using qemu-system-aarch64 and a ubuntu arm64 build host.
I pushed the result to https://hub.docker.com/r/ptpb/pb-arm64v8/
You should be able to use this with something like this:
docker network create pb-network
docker run --name mongodb --network pb-network -d shanehsu/arm64v8-mongo
docker run -e CDN_PREFIX=//d34zelngniy2d8.cloudfront.net -e LISTEN_ADDRESS=0.0.0.0 -p 10002:10002 --name pb --network pb-network -d ptpb/pb-arm64v8
Sadly, docker has pretty poor arm support (lack of architecture-agnosticness is a cancer shared by most projects in 2018) and I can't do automated arm builds on dockerhub without building them myself. They also don't have an official mongo arm64v8 image, but that random one seems to subjectively work ¯\_(ツ)_/¯
I've been considering getting arm hardware myself, so this is definitely something that interests me. Let me know if this works for you!
I just attempted this on my ODROID-C2 running Armbian. The MongoDB container runs fine, but the pb container itself exits with /usr/local/bin/python: No module named pb
.
Using the aarch64 Dockerfile with docker-compose results in the following error: https://ptpb.pw/azT8
EDIT: It must have been a modification i made to the docker-compose yaml file that was causing it- a fresh pull solved the problem and I successfully built a pb image.
Just tried the pb docker image on rpi3 running ubuntu mate but I don't think the pi architecture is supported by your docker image. Is this something you can easily include in the docker image? Is it possible to install pb on raspberry pis?