jojo243 / seafile-docker-arm64

Dockerized Seafile Setup for ARM64
MIT License
20 stars 12 forks source link

Build fails after 10 seconds (Service 'db' failed to build) #15

Open xxxcrow opened 3 years ago

xxxcrow commented 3 years ago
+ apk add --no-cache 'mysql=10.5.9-r0' 'mysql-client=10.5.9-r0'
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz
ERROR: unable to select packages:
  mysql-10.6.3-r0:
    breaks: world[mysql=10.5.9-r0]
  mysql-client-10.6.3-r0:
    breaks: world[mysql-client=10.5.9-r0]
ERROR: Service 'db' failed to build: The command '/bin/sh -c set -x             && mkdir -p /run/mysqld && mkdir -p /dbinit.d           && apk add --no-cache                   mysql=${MYSQL_VERSION}                  mysql-client=${MYSQL_VERSION}' returned a non-zero code: 2
jojo243 commented 3 years ago

Please make sure that in your .env-file, MYSQL_VERSION is set to the latest version. Generally, it should match the version from here.

e.g. MYSQL_VERSION=10.6.4-r0

xxxcrow commented 3 years ago

@jojo243 hi, now I already got seafile running from another git But when I got this error I checked the versions everywhere, and checked the latest version and replaced it, it didn't work (And also I used the .env file you provided)

jojo243 commented 3 years ago

Alright, thanks for the hint, I will look into this.

donkeybanana commented 3 years ago

I also encountered this issue today. The error actually provides a hint as to which version to use:

~/seafile-docker-arm64$ docker-compose up
WARNING: The BUILD_METHOD variable is not set. Defaulting to a blank string.
Creating network "seafile-docker-arm64_default" with the default driver
Building db
Step 1/9 : FROM alpine:edge
edge: Pulling from library/alpine
863239114e4b: Pull complete
Digest: sha256:e64a0b2fc7ff870c2b22506009288daa5134da2b8c541440694b629fc22d792e
Status: Downloaded newer image for alpine:edge
 ---> 1e093ce69acf
Step 2/9 : ARG  MYSQL_VERSION
 ---> Running in c9c2ac3dfe55
Removing intermediate container c9c2ac3dfe55
 ---> 5b84fce152c2
Step 3/9 : RUN  set -x          && mkdir -p /run/mysqld && mkdir -p /dbinit.d           && apk add --no-cache                   mysql=${MYSQL_VERSION}                        mysql-client=${MYSQL_VERSION}
 ---> Running in 589bcf2e7de9
+ mkdir -p /run/mysqld
+ mkdir -p /dbinit.d
+ apk add --no-cache 'mysql=10.5.9-r0' 'mysql-client=10.5.9-r0'
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz
ERROR: unable to select packages:
  mysql-10.6.4-r1:
    breaks: world[mysql=10.5.9-r0]
  mysql-client-10.6.4-r1:
    breaks: world[mysql-client=10.5.9-r0]
ERROR: Service 'db' failed to build: The command '/bin/sh -c set -x             && mkdir -p /run/mysqld && mkdir -p /dbinit.d           && apk add --no-cache                         mysql=${MYSQL_VERSION}                  mysql-client=${MYSQL_VERSION}' returned a non-zero code: 2

Specifically:

ERROR: unable to select packages:
  mysql-10.6.4-r1:
    breaks: world[mysql=10.5.9-r0]
  mysql-client-10.6.4-r1:
    breaks: world[mysql-client=10.5.9-r0]

I was able to successfully build by using MYSQL_VERSION=10.6.4-r1

IcHiAT commented 2 years ago

Same Error here > Solution (maybe for all)

nano .env MYSQL_VERSION=watch your error message! This is a static entry, but needs always be up to date!

Example from above:

mysql-10.6.4-r1: breaks: world[mysql=10.5.9-r0] mysql-client-10.6.4-r1: breaks: world[mysql-client=10.5.9-r0]

Error says 10.6.4-r1 so change it in the .env file!

For example for me works

5 1.786 mysql-10.6.8-r0:

5 1.786 breaks: world[mysql=10.5.9-r0]

5 1.786 mysql-client-10.6.8-r0:

5 1.786 breaks: world[mysql-client=10.5.9-r0]

So in my case 10.6.8-r0 works

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Like I said above in some seconds/minutes/weeks/months/years this version can be a different one! Watch your error message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Maybe jojo234 can fix it to non static. Thanks to jojo234, I'll give that project a try!

Btw I'm using Pi 4 (64 bit version) with Docker and NGIX Proxy Manager > Seafile