NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.22k stars 2.69k forks source link

Support for arm 32 v6 architecture #1321

Open WillJBrown opened 3 years ago

WillJBrown commented 3 years ago

I'd love to be able to run npm on my raspberry pi zero as a sort of redistributing gateway manger for the various devices on my network. I have done some cross compiling of docker images before so I could probably make the necessary changes to the build scripts if you can point me in the right direction and run though what the current build process is. Are you using docker buildx to achieve your multi-arch manifest?

Thanks very much for the program.

jc21 commented 3 years ago

Yes I am using buildx. I removed armv6 from the list a while ago, as I fully expected nginx to be too slow on pi 2/zero's. Plus no-one was really using that image and it was increasing build times by 30%.

You're more than welcome to try though.

  1. You'll need to build the nginx-full base image for armv6:
    
    git clone https://github.com/NginxProxyManager/docker-nginx-full.git
    cd docker-nginx-full

export OPENRESTY_VERSION=1.19.3.1 export LUA_VERSION=5.1.5 export LUAROCKS_VERSION=3.3.1

docker buildx create --name 'nginx-full' docker buildx use 'nginx-full'

docker buildx build \ --platform linux/arm/6 \ --progress plain \ --pull \ --build-arg BASE_TAG \ --build-arg OPENRESTY_VERSION \ --build-arg LUA_VERSION \ --build-arg LUAROCKS_VERSION \ -t nginx-full:armv6 \ -f docker/Dockerfile \ .

docker buildx rm 'nginx-full'


2. Using this base image, you'll need to build a `node` version on top of that:
```bash
vi docker/Dockerfile.node
# change the FROM image name to be the one you just built, `nginx-full:armv6`

docker buildx create --name 'nginx-full'
docker buildx use 'nginx-full'

docker buildx build \
    --platform linux/arm/6 \
    --progress plain \
    -t nginx-full:armv6-node \
    -f docker/Dockerfile.node \
    .

docker buildx rm 'nginx-full'
  1. Then use this image when building nginxproxymanager:
    
    git clone https://github.com/jc21/nginx-proxy-manager.git
    cd nginx-proxy-manager

vi docker/Dockerfile

change the FROM image name to be the one with node, nginx-full:armv6-node

./scripts/frontend-build

docker buildx create --name 'nginx-proxy-manager' docker buildx use 'nginx-proxy-manager'

docker buildx build \ --build-arg BUILD_VERSION="armv6" \ --build-arg BUILD_COMMIT="notset" \ --build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \ --platform linux/arm/6 \ --progress plain \ -t nginx-proxy-manager:armv6 \ -f docker/Dockerfile \ .

docker buildx rm 'nginx-proxy-manager'



4. Use this `nginx-proxy-manager:armv6` image on your zero
github-actions[bot] commented 8 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1: