Short Version

I am trying to rebuild the reverse proxy of jwilder/nginx-proxy:alpine on my Raspberry Pi 4 running Raspbian 10.

As the container is not configured for armhf architectures, I tweaked the Dockerfile using the arm32v7/nginx:latest container. I am able to build the container, but it returns the error standard_init_linux.go:211: exec user process caused "exec format error" when I run it.

Googling around let me assume that some part of the process load a binary that wasn't built for the armhf architecture. But I am not able pinpoint the error or fix it.

I also tried to replicate the steps in an interactive session docker run -it --rm arm32v7/nginx:latest bash (specifically, I was able to get docker-gen and forego to run and print their versions (0.7.4 and dev)) and wasn't able to replicate the issue, i.e., the individual steps seem to work and didn't throw the error.

Any idea what causes the error and how to fix it?


Most of this is copied from the original Dockerfile of jwilder/nginx-proxy with a different base nginx container, as well as some minor tweaks to installing docker-gen and forego, and copying the uploadsize.conf from the nextcloud example (see below).

All changes are commented with a #>!

Note I also have the respective files

at the same path as the Dockerfile.

# Replicating jwilder/nginx-proxy:alpine
#> Changed to the right architecture for the pi 4
FROM arm32v7/nginx:latest

# Install wget and install/updates certificates
RUN apt-get update \
 && apt-get install -y -q --no-install-recommends \
    ca-certificates \
    wget \
 && apt-get clean \
 && rm -r /var/lib/apt/lists/*

# Configure Nginx and apply fix for very long server names
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
 && sed -i 's/worker_processes  1/worker_processes  auto/' /etc/nginx/nginx.conf

# Install Forego
#> Changed forego install process to an armhf architecture
RUN wget -q https://github.com/djmaze/armhf-forego/releases/download/v0.16.1/forego -O /usr/local/bin/forego
RUN chmod u+x /usr/local/bin/forego

# Install docker-gen
#> Changed Version number and platform to the newest and armhf version

RUN wget -q -O - https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VERSION/docker-gen-linux-$DOCKER_PLATFORM-$DOCKER_GEN_VERSION.tar.gz \
  | tar -C /usr/local/bin -xvz

COPY network_internal.conf /etc/nginx/

#> included from the nextcloud example
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf  

COPY . /app/

ENV DOCKER_HOST unix:///tmp/docker.sock

VOLUME ["/etc/nginx/certs", "/etc/nginx/dhparam"]

ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["forego", "start", "-r"]


docker build -t reverse-proxy . # works as expected
docker run reverse-proxy        # fails with the error
> standard_init_linux.go:211: exec user process caused "exec format error"

Avoiding the XY-Problem

The ultimate goal is to use docker to run nextcloud and pihole on my raspberry pi. The reverse proxy is used by nextcloud's examples to hide the different service (postgres, nextcloud, etc) behind the reverse proxy.

If you know any way to do this without the reverse proxy, I'd be happy to listen. Any help is appreciated!

  • I have the same issue and tried this github.com/Alexander-Krause/…. But also didnt worked. Did you solved it?
    – KA N
    Feb 17, 2020 at 20:30
  • In the end I didnt use nexcloud in a docker container but installed it directly. So I didn't solve this specific issue, but the underlying problem got solved.
    – David
    Feb 18, 2020 at 8:16

1 Answer 1


Woah, I know it's already been a year since there has been any activity here, but for everyone else having this issue while trying to set up jwilder/nginx-proxy using Docker on their Raspberry Pi (or any other device with an ARM based processor):

A super cool dude called "Brain Gamer" has created a fork for creating working armhf builds of the jwilder/nginx-proxy.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.