Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
385 views
in Technique[技术] by (71.8m points)

Docker hub image fails but building its Dockerfile works. What is happening?

I have used Docker-compose a lot recently, but this time I found a container I really want to use but the docker hub’s image is not compatible with my arm/v6 raspberry pi. Using it anyway results in

standard_init_linux.go:219: exec user process caused: exec format error

Strangely, copying the Dockerfile and building it with

    build:
      context: ./ttrss-docker/src/app

results in the app working well. But for some reason, I can’t use the dockerhub’s image.

In case it matters, the Dockerfile is this, and the Docker Hub image is this.

FROM alpine:3.12
EXPOSE 9000/tcp

RUN apk add --no-cache dcron php7 php7-fpm 
    php7-pdo php7-gd php7-pgsql php7-pdo_pgsql php7-mbstring 
    php7-intl php7-xml php7-curl php7-session 
    php7-dom php7-fileinfo php7-json 
    php7-pcntl php7-posix php7-zip php7-openssl 
    git postgresql-client sudo

ADD startup.sh /
ADD updater.sh /
ADD index.php /
ADD dcron.sh /
ADD backup.sh /etc/periodic/weekly/backup

RUN sed -i.bak 's/^listen = 127.0.0.1:9000/listen = 9000/' /etc/php7/php-fpm.d/www.conf
RUN sed -i.bak 's/(memory_limit =) 128M/1 256M/' /etc/php7/php.ini

RUN mkdir -p /var/www

CMD /startup.sh

Question: if I don’t use the Docker hubs image, can Watchtower update my container ? If not, does anyone know what’s happening and how I can achieve a container that updates via Watchtower ?

Many thanks :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I can see the base is only capable with alpine:3.12 32/64 bit of system.

-- For arm/v6 raspberry pi .. Try to use arm32v6/alpine this image and check if it is working or not.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...