"docker-compose build"コマンドを実行すると、次のエラーが発生します。
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
Docker-compose.yml:
version: '2'
services:
db:
#image: hypriot/rpi-mysql
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=mdh2019
volumes:
- /mnt/data/mysql:/var/lib/mysql
duply:
build: .
volumes:
- ./config:/config
- /mnt/data:/mnt/data
- ./webinterface:/var/www/html/MyDigitalHome
- /mnt/guestbackup:/mnt/guestbackup/backup
#- /mnt/usb-removable:/usb-removable
ports:
- "8080:80"
- "24:22"
links:
- db
seafile:
build: seafile/
volumes:
- ./seafile/config:/config
- /mnt/data/seafile:/data
ports:
- "8000:8000"
- "8082:8082"
environment:
- [email protected]
- SEAFILE_ADMIN_PW=xxxxxxxx
owncloud:
build: owncloud/
volumes:
- /mnt/data/owncloud:/data
- ./owncloud/config:/var/www/html/config
ports:
- "8090:80"
links:
- db:mysql
mailserver:
build: mailserver/
volumes:
- "./mailserver/dovecot/10-mail.conf:/etc/dovecot/conf.d/10-mail.conf:ro"
- "./mailserver/fetchmail/fetchmailrc:/etc/fetchmailrc:ro"
- "./mailserver/ssl/exim.crt:/etc/ssl/exim.crt:ro"
- "./mailserver/ssl/exim.pem:/etc/ssl/exim.pem:ro"
- "/mnt/data/mailserver:/var/mail"
- "/mnt/data/mailserver/home:/home"
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
- "8079:80"
- "8078:443"
links:
- db
私のdockerfileは次のようになります。
# FROM debian
FROM armv7/armhf-debian
MAINTAINER Me
# install packages
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates \
python2.7 \
python-setuptools \
python-imaging \
python-ldap \
python-urllib3 \
sqlite3 \
wget
# Copy scripts
ADD ./scripts /scripts
# set environment variables
ENV SERVER_NAME mdh-seafile
ENV SERVER_IP 127.0.0.1
ENV FILESERVER_PORT 8082
ENV SEAFILE_DIR /data
ENV SEAFILE_VERSION seafile-server-6.0.8
ENV INSTALLPATH /opt/seafile/${SEAFILE_VERSION}/
# clean for smaller image
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Volumes for persistent configuration
VOLUME /opt/seafile/
# set entrypoint
ENTRYPOINT bash /scripts/init.sh
私はDocker / Debian 9を使用しています。
答え1
私はそれを解決しました:
変更が必要です
# FROM debian
FROM armv7/armhf-debian
到着する:
FROM debian
# FROM armv7/armhf-debian
そして以前にあったすべてについて言及してください# install packages
。これはDockerfileのRaspberry Pi部分です。
みんなありがとうございます。