Docker Community Forums

Share and learn in the Docker community.

"docker-compose build" returning "exec format error"

When running the “docker-compose build” command, I’m running the following error:

standard_init_linux.go:207: exec user process caused "exec format error"
ERROR: Service 'seafile' failed to build: The command '/bin/sh -c apt-get 
update && DEBIAN_FRONTEND=noninteractive apt-get install -y ca-
certificates python2.7 python-setuptools python-imaging python-ldap 
python-urllib3 sqlite3 wget' returned a non-zero code: 1

My dockerfile looks like:

FROM debian
# FROM armv7/armhf-debian

MAINTAINER Me

# install packages
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
  --no-install-recommends \
  duplicity \
  duply \
  pwgen \
  mawk \
  python-paramiko \
  ddclient \
  openssh-server \
  nano \
  apache2 \
  #libapache2-mod-php5 \
  #php5 \
  #php5-mysql \
  sudo \
  cron \
  openssh-server

# apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid

# environment variables needed for the webinterface
# default hostname: raspberrypi
ENV HOSTNAME ubuntu-xenial

# add www-data to sudoers
RUN echo "www-data ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# Copy scripts and files
ADD ./scripts /scripts

# clean for smaller image
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENTRYPOINT bash /scripts/init.sh

I’m new to docker/Debian9 so I’d appreciate any help. :slight_smile: