Docker Hub ARM image? #1717

Closed
opened 2020-04-18 05:15:25 +00:00 by py_crash · 22 comments

The container used as base, nginx, has armhf and arm64 images, so it shoudn't be a problem to create arm images for vikunja

The container used as base, `nginx`, has `armhf` and `arm64` images, so it shoudn't be a problem to create arm images for vikunja
py_crash changed title from Dockerhub ARM image? to Docker Hub ARM image? 2020-04-18 05:15:45 +00:00
Owner

Sounds like a good idea, I'll take a look.

Sounds like a good idea, I'll take a look.
Owner

It seems we need an arm machine for that.

It seems we need an arm machine for that.

@konrad, nope with docker you can now use xbuilder to build for a deidcated plateforme and test in the virtualenv of it: https://www.docker.com/blog/multi-arch-images/

@py_cash there is debian builder in vikunja repo, you can use it in a dockerfile with a debian arm image as a base, same for njinx.

@konrad, nope with docker you can now use xbuilder to build for a deidcated plateforme and test in the virtualenv of it: https://www.docker.com/blog/multi-arch-images/ @py_cash there is debian builder in vikunja repo, you can use it in a dockerfile with a debian arm image as a base, same for njinx.
Owner

@YasserAntonio As far as I understand it, this will only work with docker desktop, which is a windows/macos only version of docker. I don't own either. Also I'd like to automate all building of docker images and this kind of prevents that. If I' just throw an arm machine in my build server it would be way easier to get it working.

@YasserAntonio As far as I understand it, this will only work with docker desktop, which is a windows/macos only version of docker. I don't own either. Also I'd like to automate all building of docker images and this kind of prevents that. If I' just throw an arm machine in my build server it would be way easier to get it working.

You're right, since this feature is experimental it only works for Docker desktops versions.

You're right, since this feature is experimental it only works for Docker desktops versions.

Hello @konrad, do you think you will do it or no time for that at the moment ? I Hope we will see an arm version for this app. Thanks.

Hello @konrad, do you think you will do it or no time for that at the moment ? I Hope we will see an arm version for this app. Thanks.
Owner

@YasserAntonio The problem is not so much about having the time to do it but more about finding an affordable arm build server, if you know of one, please let me know.

If you have one (which I suppose, since you seem to have a use case for arm docker images) you could try to just build the docker image on that - just clone the repo and do docker build ..

About your aws problem: dl.vikunja.io is not aws capable, it is just a frontend to the minio bucket where I push releases. You should use curl or wget to download binaries off it. But if you want to use that for a docker image, you're probably better off using the Dockerfiles in the git repos and build from those. The deb packages are amd64 anyway...

@YasserAntonio The problem is not so much about having the time to do it but more about finding an affordable arm build server, if you know of one, please let me know. If you have one (which I suppose, since you seem to have a use case for arm docker images) you could try to just build the docker image on that - just clone the repo and do `docker build .`. About your aws problem: dl.vikunja.io is not aws capable, it is just a frontend to the minio bucket where I push releases. You should use `curl` or `wget` to download binaries off it. But if you want to use that for a docker image, you're probably better off using the `Dockerfile`s in the git repos and build from those. The deb packages are amd64 anyway...

@Konrad I already tried this. I use docker buildx to emulate the arm env but i keep having the same error. Here is the logs:

docker buildx build --platform linux/arm/v7  --tag registry.ln:5000/vikunja_frontend_armv7:0.1 . --push
[+] Building 411.5s (13/14)                                                                                                                                                                                   
 => [internal] load build definition from Dockerfile                                                                                                                                                     0.1s
 => => transferring dockerfile: 1.06kB                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/nginx:latest                                                                                                                                          2.9s
 => [internal] load metadata for docker.io/library/node:13.14.0                                                                                                                                          1.4s
 => [compile-image 1/4] FROM docker.io/library/node:13.14.0@sha256:70d4fffcab39a1f9f7161d58e674ddcc56c7f0724196b68d52a87bab15cb4a04                                                                      0.0s
 => => resolve docker.io/library/node:13.14.0@sha256:70d4fffcab39a1f9f7161d58e674ddcc56c7f0724196b68d52a87bab15cb4a04                                                                                    0.0s
 => [stage-1 1/5] FROM docker.io/library/nginx@sha256:21f32f6c08406306d822a0e6e8b7dc81f53f336570e852e25fbe1e3e3d0d0133                                                                                   0.0s
 => => resolve docker.io/library/nginx@sha256:21f32f6c08406306d822a0e6e8b7dc81f53f336570e852e25fbe1e3e3d0d0133                                                                                           0.0s
 => [internal] load build context                                                                                                                                                                        1.6s
 => => transferring context: 6.25MB                                                                                                                                                                      1.6s
 => CACHED [compile-image 2/4] WORKDIR /build                                                                                                                                                            0.0s
 => [compile-image 3/4] COPY .  ./                                                                                                                                                                       0.2s
 => CACHED [stage-1 2/5] RUN apt-get update && apt-get install -y apt-utils openssl &&   mkdir -p /etc/nginx/ssl &&   openssl genrsa -out /etc/nginx/ssl/dummy.key 2048 &&   openssl req -new -key /etc  0.0s
 => [stage-1 3/5] COPY nginx.conf /etc/nginx/nginx.conf                                                                                                                                                  0.1s
 => [stage-1 4/5] COPY run.sh /run.sh                                                                                                                                                                    0.1s
 => ERROR [compile-image 4/4] RUN   yarn install --frozen-lockfile &&   echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/versi  406.7s
------                                                                                                                                                                                                        
 > [compile-image 4/4] RUN   yarn install --frozen-lockfile &&   echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/version.json &&   yarn run build:                                                                                                                                                                                                  
#13 2.854 Unknown QEMU_IFLA_INFO_KIND ipip                                                                                                                                                                    
#13 2.854 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 2.872 yarn install v1.22.4
#13 2.932 Unknown QEMU_IFLA_INFO_KIND ipip
#13 2.932 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 4.553 [1/4] Resolving packages...
#13 13.96 [2/4] Fetching packages...
#13 47.78 Unknown QEMU_IFLA_INFO_KIND ipip
#13 47.78 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 47.80 info There appears to be trouble with your network connection. Retrying...
#13 61.77 Unknown QEMU_IFLA_INFO_KIND ipip
#13 61.77 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 61.80 info There appears to be trouble with your network connection. Retrying...
#13 81.48 Unknown QEMU_IFLA_INFO_KIND ipip
#13 81.49 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 81.50 info There appears to be trouble with your network connection. Retrying...
#13 95.02 Unknown QEMU_IFLA_INFO_KIND ipip
#13 95.02 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 95.03 info There appears to be trouble with your network connection. Retrying...
#13 113.7 Unknown QEMU_IFLA_INFO_KIND ipip
#13 113.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 113.7 info There appears to be trouble with your network connection. Retrying...
#13 115.2 Unknown QEMU_IFLA_INFO_KIND ipip
#13 115.2 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 128.3 Unknown QEMU_IFLA_INFO_KIND ipip
#13 128.3 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 128.3 info There appears to be trouble with your network connection. Retrying...
#13 147.0 Unknown QEMU_IFLA_INFO_KIND ipip
#13 147.0 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 147.0 info There appears to be trouble with your network connection. Retrying...
#13 160.5 Unknown QEMU_IFLA_INFO_KIND ipip
#13 160.5 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 160.6 info There appears to be trouble with your network connection. Retrying...
#13 161.6 Unknown QEMU_IFLA_INFO_KIND ipip
#13 161.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 180.4 Unknown QEMU_IFLA_INFO_KIND ipip
#13 180.4 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 186.1 error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.14.0.tgz: ESOCKETTIMEDOUT".
#13 186.1 info If you think this is a bug, please open a bug report with the information provided in "/build/yarn-error.log".
#13 186.1 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#13 194.7 Unknown QEMU_IFLA_INFO_KIND ipip
#13 194.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 194.7 info There appears to be trouble with your network connection. Retrying...
#13 194.7 Unknown QEMU_IFLA_INFO_KIND ipip
#13 194.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 227.9 Unknown QEMU_IFLA_INFO_KIND ipip
#13 227.9 Unknown QEMU_IFLA_INFO_KIND ip6tnl
#13 227.9 info There appears to be trouble with your network connection. Retrying...
#13 261.1 Unknown QEMU_IFLA_INFO_KIND ipip
#13 261.1 Unknown QEMU_IFLA_INFO_KIND ip6tnl
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c yarn install --frozen-lockfile &&   echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/version.json &&   yarn run build]: buildkit-runc did not terminate successfully

If you have any idea how to change the Dockerfile to solve this i would be glad to hear it. I already tried to reach internet within the build and it was ok. I tried to increase yarn install time out : https://github.com/yarnpkg/yarn/issues/4890 but still with same issue

@Konrad I already tried this. I use docker buildx to emulate the arm env but i keep having the same error. Here is the logs: ``` docker buildx build --platform linux/arm/v7 --tag registry.ln:5000/vikunja_frontend_armv7:0.1 . --push [+] Building 411.5s (13/14) => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 1.06kB 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/nginx:latest 2.9s => [internal] load metadata for docker.io/library/node:13.14.0 1.4s => [compile-image 1/4] FROM docker.io/library/node:13.14.0@sha256:70d4fffcab39a1f9f7161d58e674ddcc56c7f0724196b68d52a87bab15cb4a04 0.0s => => resolve docker.io/library/node:13.14.0@sha256:70d4fffcab39a1f9f7161d58e674ddcc56c7f0724196b68d52a87bab15cb4a04 0.0s => [stage-1 1/5] FROM docker.io/library/nginx@sha256:21f32f6c08406306d822a0e6e8b7dc81f53f336570e852e25fbe1e3e3d0d0133 0.0s => => resolve docker.io/library/nginx@sha256:21f32f6c08406306d822a0e6e8b7dc81f53f336570e852e25fbe1e3e3d0d0133 0.0s => [internal] load build context 1.6s => => transferring context: 6.25MB 1.6s => CACHED [compile-image 2/4] WORKDIR /build 0.0s => [compile-image 3/4] COPY . ./ 0.2s => CACHED [stage-1 2/5] RUN apt-get update && apt-get install -y apt-utils openssl && mkdir -p /etc/nginx/ssl && openssl genrsa -out /etc/nginx/ssl/dummy.key 2048 && openssl req -new -key /etc 0.0s => [stage-1 3/5] COPY nginx.conf /etc/nginx/nginx.conf 0.1s => [stage-1 4/5] COPY run.sh /run.sh 0.1s => ERROR [compile-image 4/4] RUN yarn install --frozen-lockfile && echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/versi 406.7s ------ > [compile-image 4/4] RUN yarn install --frozen-lockfile && echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/version.json && yarn run build: #13 2.854 Unknown QEMU_IFLA_INFO_KIND ipip #13 2.854 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 2.872 yarn install v1.22.4 #13 2.932 Unknown QEMU_IFLA_INFO_KIND ipip #13 2.932 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 4.553 [1/4] Resolving packages... #13 13.96 [2/4] Fetching packages... #13 47.78 Unknown QEMU_IFLA_INFO_KIND ipip #13 47.78 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 47.80 info There appears to be trouble with your network connection. Retrying... #13 61.77 Unknown QEMU_IFLA_INFO_KIND ipip #13 61.77 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 61.80 info There appears to be trouble with your network connection. Retrying... #13 81.48 Unknown QEMU_IFLA_INFO_KIND ipip #13 81.49 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 81.50 info There appears to be trouble with your network connection. Retrying... #13 95.02 Unknown QEMU_IFLA_INFO_KIND ipip #13 95.02 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 95.03 info There appears to be trouble with your network connection. Retrying... #13 113.7 Unknown QEMU_IFLA_INFO_KIND ipip #13 113.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 113.7 info There appears to be trouble with your network connection. Retrying... #13 115.2 Unknown QEMU_IFLA_INFO_KIND ipip #13 115.2 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 128.3 Unknown QEMU_IFLA_INFO_KIND ipip #13 128.3 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 128.3 info There appears to be trouble with your network connection. Retrying... #13 147.0 Unknown QEMU_IFLA_INFO_KIND ipip #13 147.0 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 147.0 info There appears to be trouble with your network connection. Retrying... #13 160.5 Unknown QEMU_IFLA_INFO_KIND ipip #13 160.5 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 160.6 info There appears to be trouble with your network connection. Retrying... #13 161.6 Unknown QEMU_IFLA_INFO_KIND ipip #13 161.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 180.4 Unknown QEMU_IFLA_INFO_KIND ipip #13 180.4 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 186.1 error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.14.0.tgz: ESOCKETTIMEDOUT". #13 186.1 info If you think this is a bug, please open a bug report with the information provided in "/build/yarn-error.log". #13 186.1 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. #13 194.7 Unknown QEMU_IFLA_INFO_KIND ipip #13 194.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 194.7 info There appears to be trouble with your network connection. Retrying... #13 194.7 Unknown QEMU_IFLA_INFO_KIND ipip #13 194.7 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 227.9 Unknown QEMU_IFLA_INFO_KIND ipip #13 227.9 Unknown QEMU_IFLA_INFO_KIND ip6tnl #13 227.9 info There appears to be trouble with your network connection. Retrying... #13 261.1 Unknown QEMU_IFLA_INFO_KIND ipip #13 261.1 Unknown QEMU_IFLA_INFO_KIND ip6tnl ------ failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c yarn install --frozen-lockfile && echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/version.json && yarn run build]: buildkit-runc did not terminate successfully ``` If you have any idea how to change the Dockerfile to solve this i would be glad to hear it. I already tried to reach internet within the build and it was ok. I tried to increase yarn install time out : https://github.com/yarnpkg/yarn/issues/4890 but still with same issue
Owner

That looks like an error with yarn not being reachable, not an issue with the cross compilation build. All you can do is retry in that case. (I assume you can normally reach the yarn repo without issues, no geo blocking etc)

That looks like an error with yarn not being reachable, not an issue with the cross compilation build. All you can do is retry in that case. (I assume you can normally reach the yarn repo without issues, no geo blocking etc)

Thanks @konrad. As you said i just had to wait for yarn to be available and i retried but still my timeout param on the frontend dockerfile was needed: yarn install --frozen-lockfile --network-timeout 100000 && \
No trouble with the api's arm build.

Thus i builded the api and frontend arm version and just to check if it run on the arm architecture, whitout param, and it was all fine. After that i tried to reuse the docker-compose provided as an exemple (tested on man mac without issue). I had to change mariadb for mariadb's arm version which made me fall on this issue : https://github.com/linuxserver-archive/docker-mariadb-armhf/issues/7 while running the api's arm version and didn't suceed to solve it.

So i tried with mysql :

vikunja_api.1.lxsgvsz4v1su@Hestia    | usermod: no changes
vikunja_api.1.lxsgvsz4v1su@Hestia    | 2020/06/21 21:18:21 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
vikunja_api.1.lxsgvsz4v1su@Hestia    | 2020/06/21 21:18:21 Using default config.
vikunja_api.1.1crkel3zvpml@Hestia    | usermod: no changes
vikunja_api.1.lxsgvsz4v1su@Hestia    | 2020-06-21T21:18:21.751212704Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp 10.0.4.67:3306: connect: connection refused
vikunja_api.1.1crkel3zvpml@Hestia    | 2020/06/21 21:18:32 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
vikunja_api.1.1crkel3zvpml@Hestia    | 2020/06/21 21:18:32 Using default config.
vikunja_api.1.1crkel3zvpml@Hestia    | 2020-06-21T21:18:32.971208957Z: INFO	▶ migration/Migrate 025 Ran all migrations successfully.
vikunja_api.1.1crkel3zvpml@Hestia    | 2020-06-21T21:18:32.972488951Z: INFO	▶ cmd/func2 026 Vikunja version 0.13.1+73-db0126968a
vikunja_api.1.1crkel3zvpml@Hestia    | ⇨ http server started on [::]:3456

But the frontend shows a blank page and no errors in logs or docker service ps in the frontend arm version.

Here is my composefile :

version: '3'


services:

  db:
    image: biarms/mysql:5.7.30-beta-travis
    environment:
      MYSQL_ROOT_PASSWORD: supersecret
      MYSQL_DATABASE: vikunja
    volumes:
      - /home/pi/testdb:/var/lib/mysql
    deploy:
      placement:
        constraints:
          - 'node.hostname == Hestia'
    restart: unless-stopped

  api:
    image: registry.ln:5000/vikunja_api_armv7:0.1
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: supersecret
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_USER: root
      VIKUNJA_DATABASE_DATABASE: vikunja
    volumes:
      - /home/pi/vikunja/api:/app/vikunja/files
    deploy:
      placement:
        constraints:
          - 'node.hostname == Hestia'
    restart: unless-stopped
    depends_on:
      - db

  frontend:
    image: registry.ln:5000/vikunja_frontend_armv7:0.1
    networks:
      - traefik-local
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.dns.rule=Host(`vikunja.ln`)"
        - "traefik.http.routers.dns.entrypoints=web"
        - "traefik.http.services.dns.loadbalancer.server.port=80"
      placement:
        constraints:
          - 'node.hostname == Hestia'
    depends_on:
      - api
    restart: unless-stopped

networks:
  traefik-local:
    external: true

I run it on a swarm and my traefik settings works well for other webapps.

UPDATE:

api's arm version outputed this log:

vikunja_api.1.ihhb90ph8mgo@Hestia    | usermod: no changes
vikunja_api.1.ihhb90ph8mgo@Hestia    | 2020/06/21 21:28:02 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
vikunja_api.1.ihhb90ph8mgo@Hestia    | 2020/06/21 21:28:02 Using default config.
vikunja_api.1.ihhb90ph8mgo@Hestia    | 2020-06-21T21:28:02.915061276Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp 10.0.4.72:3306: connect: connection refused

i dont know why the connection got refused...

vikunja_api.1.ihhb90ph8mgo@Hestia    | usermod: no changes
vikunja_api.1.ihhb90ph8mgo@Hestia    | 2020/06/21 21:28:02 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
vikunja_api.1.ihhb90ph8mgo@Hestia    | 2020/06/21 21:28:02 Using default config.
vikunja_api.1.ihhb90ph8mgo@Hestia    | 2020-06-21T21:28:02.915061276Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp 10.0.4.72:3306: connect: connection refused
vikunja_api.1.7exho5esfxvf@Hestia    | usermod: no changes
vikunja_api.1.7exho5esfxvf@Hestia    | 2020/06/21 21:28:14 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
vikunja_api.1.7exho5esfxvf@Hestia    | 2020/06/21 21:28:14 Using default config.
vikunja_api.1.7exho5esfxvf@Hestia    | 2020-06-21T21:28:14.522089088Z: INFO	▶ migration/Migrate 025 Ran all migrations successfully.
vikunja_api.1.7exho5esfxvf@Hestia    | 2020-06-21T21:28:14.523031375Z: INFO	▶ cmd/func2 026 Vikunja version 0.13.1+73-db0126968a
vikunja_api.1.7exho5esfxvf@Hestia    | ⇨ http server started on [::]:3456

connection seems unstale.

Thanks @konrad. As you said i just had to wait for yarn to be available and i retried but still my timeout param on the frontend dockerfile was needed: `yarn install --frozen-lockfile --network-timeout 100000 && \` No trouble with the api's arm build. Thus i builded the api and frontend arm version and just to check if it run on the arm architecture, whitout param, and it was all fine. After that i tried to reuse the docker-compose provided as an exemple (tested on man mac without issue). I had to change mariadb for mariadb's arm version which made me fall on this issue : https://github.com/linuxserver-archive/docker-mariadb-armhf/issues/7 while running the api's arm version and didn't suceed to solve it. So i tried with mysql : ``` vikunja_api.1.lxsgvsz4v1su@Hestia | usermod: no changes vikunja_api.1.lxsgvsz4v1su@Hestia | 2020/06/21 21:18:21 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]" vikunja_api.1.lxsgvsz4v1su@Hestia | 2020/06/21 21:18:21 Using default config. vikunja_api.1.1crkel3zvpml@Hestia | usermod: no changes vikunja_api.1.lxsgvsz4v1su@Hestia | 2020-06-21T21:18:21.751212704Z: CRITICAL ▶ migration/Migrate 002 Migration failed: dial tcp 10.0.4.67:3306: connect: connection refused vikunja_api.1.1crkel3zvpml@Hestia | 2020/06/21 21:18:32 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]" vikunja_api.1.1crkel3zvpml@Hestia | 2020/06/21 21:18:32 Using default config. vikunja_api.1.1crkel3zvpml@Hestia | 2020-06-21T21:18:32.971208957Z: INFO ▶ migration/Migrate 025 Ran all migrations successfully. vikunja_api.1.1crkel3zvpml@Hestia | 2020-06-21T21:18:32.972488951Z: INFO ▶ cmd/func2 026 Vikunja version 0.13.1+73-db0126968a vikunja_api.1.1crkel3zvpml@Hestia | ⇨ http server started on [::]:3456 ``` But the frontend shows a blank page and no errors in logs or docker service ps in the frontend arm version. Here is my composefile : ``` version: '3' services: db: image: biarms/mysql:5.7.30-beta-travis environment: MYSQL_ROOT_PASSWORD: supersecret MYSQL_DATABASE: vikunja volumes: - /home/pi/testdb:/var/lib/mysql deploy: placement: constraints: - 'node.hostname == Hestia' restart: unless-stopped api: image: registry.ln:5000/vikunja_api_armv7:0.1 environment: VIKUNJA_DATABASE_HOST: db VIKUNJA_DATABASE_PASSWORD: supersecret VIKUNJA_DATABASE_TYPE: mysql VIKUNJA_DATABASE_USER: root VIKUNJA_DATABASE_DATABASE: vikunja volumes: - /home/pi/vikunja/api:/app/vikunja/files deploy: placement: constraints: - 'node.hostname == Hestia' restart: unless-stopped depends_on: - db frontend: image: registry.ln:5000/vikunja_frontend_armv7:0.1 networks: - traefik-local deploy: labels: - "traefik.enable=true" - "traefik.http.routers.dns.rule=Host(`vikunja.ln`)" - "traefik.http.routers.dns.entrypoints=web" - "traefik.http.services.dns.loadbalancer.server.port=80" placement: constraints: - 'node.hostname == Hestia' depends_on: - api restart: unless-stopped networks: traefik-local: external: true ``` I run it on a swarm and my traefik settings works well for other webapps. UPDATE: api's arm version outputed this log: ``` vikunja_api.1.ihhb90ph8mgo@Hestia | usermod: no changes vikunja_api.1.ihhb90ph8mgo@Hestia | 2020/06/21 21:28:02 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]" vikunja_api.1.ihhb90ph8mgo@Hestia | 2020/06/21 21:28:02 Using default config. vikunja_api.1.ihhb90ph8mgo@Hestia | 2020-06-21T21:28:02.915061276Z: CRITICAL ▶ migration/Migrate 002 Migration failed: dial tcp 10.0.4.72:3306: connect: connection refused ``` i dont know why the connection got refused... ``` vikunja_api.1.ihhb90ph8mgo@Hestia | usermod: no changes vikunja_api.1.ihhb90ph8mgo@Hestia | 2020/06/21 21:28:02 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]" vikunja_api.1.ihhb90ph8mgo@Hestia | 2020/06/21 21:28:02 Using default config. vikunja_api.1.ihhb90ph8mgo@Hestia | 2020-06-21T21:28:02.915061276Z: CRITICAL ▶ migration/Migrate 002 Migration failed: dial tcp 10.0.4.72:3306: connect: connection refused vikunja_api.1.7exho5esfxvf@Hestia | usermod: no changes vikunja_api.1.7exho5esfxvf@Hestia | 2020/06/21 21:28:14 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]" vikunja_api.1.7exho5esfxvf@Hestia | 2020/06/21 21:28:14 Using default config. vikunja_api.1.7exho5esfxvf@Hestia | 2020-06-21T21:28:14.522089088Z: INFO ▶ migration/Migrate 025 Ran all migrations successfully. vikunja_api.1.7exho5esfxvf@Hestia | 2020-06-21T21:28:14.523031375Z: INFO ▶ cmd/func2 026 Vikunja version 0.13.1+73-db0126968a vikunja_api.1.7exho5esfxvf@Hestia | ⇨ http server started on [::]:3456 ``` connection seems unstale.
Owner

The connection getting refused is probably due to the mysql container taking a bit of time to get up and running. I see you added restart: unless-stopped to the container definition so it should automatically get restarted when the api container exits because of mysql not being ready to handle connections. So that should not be an issue, it just takes a bit until the api is fully operational.

But the frontend shows a blank page and no errors in logs or docker service ps in the frontend arm version.

Do you see any issues in the browser console?

The connection getting refused is probably due to the mysql container taking a bit of time to get up and running. I see you added `restart: unless-stopped` to the container definition so it should automatically get restarted when the api container exits because of mysql not being ready to handle connections. So that should not be an issue, it just takes a bit until the api is fully operational. > But the frontend shows a blank page and no errors in logs or docker service ps in the frontend arm version. Do you see any issues in the browser console?

Well it might be an issue from my swarm configuration. Nevermind i just composed it outside the swarm and it goes up, at least the login page^^

@konrad could you remind me the defaul user ? I still need to configure the smtp to register but i want to test all the basic feature.

For people willing to use vikunja on a rasp :
https://hub.docker.com/repository/docker/yasserantonio/vikunja_api_armv7
https://hub.docker.com/repository/docker/yasserantonio/vikunja_frontend_armv7

@py_crash The vikunja arm version docker-compose.yml is provided in both readmes of vikunja's arm project of my docker hub repository.

Well it might be an issue from my swarm configuration. Nevermind i just composed it outside the swarm and it goes up, at least the login page^^ @konrad could you remind me the defaul user ? I still need to configure the smtp to register but i want to test all the basic feature. For people willing to use vikunja on a rasp : https://hub.docker.com/repository/docker/yasserantonio/vikunja_api_armv7 https://hub.docker.com/repository/docker/yasserantonio/vikunja_frontend_armv7 @py_crash The vikunja arm version docker-compose.yml is provided in both readmes of vikunja's arm project of my docker hub repository.
Owner

@YasserAntonio There is no default user, you need to register for one. If you don't configure smtp, you won't need to confirm the email address.

@YasserAntonio There is no default user, you need to register for one. If you don't configure smtp, you won't need to confirm the email address.
Owner

In other news, I got my hands on an arm server, so there will be official arm docker images relatively soon.

In other news, I got my hands on an arm server, so there will be official arm docker images relatively soon.

Cool news !

About creating the fistr user i tried to create one and whe i click on the Register button it get a red box replacing it (screenshot for detail). And the added credentials doens't work. Did i miss something ?

api logs for user creation :

2020-06-22T09:19:12.506868954Z: WEB 	▶ 172.19.0.5  POST 412 /api/v1/login 12.378576669s - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
2020-06-22T09:19:54.489346603Z: WEB 	▶ 172.19.0.5  POST 412 /api/v1/login 12.478552522s - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
echo: http: panic serving 172.19.0.5:48406: runtime error: index out of range [-1]
goroutine 116 [running]:
net/http.(*conn).serve.func1(0x36ce180)
	/usr/local/go/src/net/http/server.go:1772 +0xf0
panic(0xae7ae8, 0x3428750)
	/usr/local/go/src/runtime/panic.go:975 +0x3d4
github.com/labstack/echo/v4.(*Router).Find(0x3828630, 0x342c0f0, 0x4, 0x342c0f5, 0x15, 0xdfebb8, 0x36ce0c0)
	/go/src/code.vikunja.io/api/vendor/github.com/labstack/echo/v4/router.go:427 +0x110c
github.com/labstack/echo/v4.(*Echo).ServeHTTP(0x3852000, 0xdf2cb0, 0x3516510, 0x3512400)
	/go/src/code.vikunja.io/api/vendor/github.com/labstack/echo/v4/echo.go:609 +0xe4
net/http.serverHandler.ServeHTTP(0x3836090, 0xdf2cb0, 0x3516510, 0x3512400)
	/usr/local/go/src/net/http/server.go:2807 +0x88
net/http.(*conn).serve(0x36ce180, 0xdf4790, 0x36a5860)
	/usr/local/go/src/net/http/server.go:1895 +0x7d4
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2933 +0x2d0


I will create a new issue if your confirm that this behaviour is not normal

Cool news ! About creating the fistr user i tried to create one and whe i click on the Register button it get a red box replacing it (screenshot for detail). And the added credentials doens't work. Did i miss something ? api logs for user creation : ``` 2020-06-22T09:19:12.506868954Z: WEB ▶ 172.19.0.5 POST 412 /api/v1/login 12.378576669s - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 2020-06-22T09:19:54.489346603Z: WEB ▶ 172.19.0.5 POST 412 /api/v1/login 12.478552522s - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 echo: http: panic serving 172.19.0.5:48406: runtime error: index out of range [-1] goroutine 116 [running]: net/http.(*conn).serve.func1(0x36ce180) /usr/local/go/src/net/http/server.go:1772 +0xf0 panic(0xae7ae8, 0x3428750) /usr/local/go/src/runtime/panic.go:975 +0x3d4 github.com/labstack/echo/v4.(*Router).Find(0x3828630, 0x342c0f0, 0x4, 0x342c0f5, 0x15, 0xdfebb8, 0x36ce0c0) /go/src/code.vikunja.io/api/vendor/github.com/labstack/echo/v4/router.go:427 +0x110c github.com/labstack/echo/v4.(*Echo).ServeHTTP(0x3852000, 0xdf2cb0, 0x3516510, 0x3512400) /go/src/code.vikunja.io/api/vendor/github.com/labstack/echo/v4/echo.go:609 +0xe4 net/http.serverHandler.ServeHTTP(0x3836090, 0xdf2cb0, 0x3516510, 0x3512400) /usr/local/go/src/net/http/server.go:2807 +0x88 net/http.(*conn).serve(0x36ce180, 0xdf4790, 0x36a5860) /usr/local/go/src/net/http/server.go:1895 +0x7d4 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:2933 +0x2d0 ``` I will create a new issue if your confirm that this behaviour is not normal
Owner

That's an issue whoose root-cause lies in the web framework I'm using for the api. However, there also was a bug in the frontend which I've fixed yesterday in 5283f006f5, please update the frontend (git pull && docker build) and try again. Registering should work with that.

If you're interested about the how and why, I've already openend an issue at their repo: https://github.com/labstack/echo/issues/1594

(The error message you're seeing is a fatal, unrecoverable error and therefore the api request is not correctly handled and instead crashes the process capable of handling it)

That's an issue whoose root-cause lies in the web framework I'm using for the api. However, there also was a bug in the frontend which I've fixed yesterday in https://kolaente.dev/vikunja/frontend/commit/5283f006f591e915dcb0262d5af91b6e6152b1dc, please update the frontend (git pull && docker build) and try again. Registering should work with that. If you're interested about the how and why, I've already openend an issue at their repo: https://github.com/labstack/echo/issues/1594 (The error message you're seeing is a fatal, unrecoverable error and therefore the api request is not correctly handled and instead crashes the process capable of handling it)

Okey ! Thanks :D

Okey ! Thanks :D

@py_crash i updated the frontend with @konrad fixed version : https://hub.docker.com/repository/docker/yasserantonio/vikunja_frontend_armv7

Everything works fine now. Thanks @konrad for this project.

@py_crash i updated the frontend with @konrad fixed version : https://hub.docker.com/repository/docker/yasserantonio/vikunja_frontend_armv7 Everything works fine now. Thanks @konrad for this project.
Owner

Update about automatically building arm docker images in the pipeline: I've added the arm server to the drone configuration and am using it so far, but it seems to have issues - not sure where they come from. I'll try to get this a bit more stable, but in the end will probably just buy a raspberry pi and use that as a build agent.

I'll keep this issue open until the builds are reliable.

Update about automatically building arm docker images in the pipeline: I've added the arm server to the drone configuration and am using it so far, but it seems to have issues - not sure where they come from. I'll try to get this a bit more stable, but in the end will probably just buy a raspberry pi and use that as a build agent. I'll keep this issue open until the builds are reliable.

@konrad why not using job with a windows /osx instance having docker desktop on it ? The buildx feature worked for me. I compiled vikunja arm version on my mac using this command docker buildx build --platform linux/arm/v7 --output type=docker,dest=- . > vikunja_frontend_armv7.tar. It can build for a lot of other plateforms too https://www.docker.com/blog/multi-platform-docker-builds/

@konrad why not using job with a windows /osx instance having docker desktop on it ? The buildx feature worked for me. I compiled vikunja arm version on my mac using this command `docker buildx build --platform linux/arm/v7 --output type=docker,dest=- . > vikunja_frontend_armv7.tar`. It can build for a lot of other plateforms too https://www.docker.com/blog/multi-platform-docker-builds/
Owner

@YasserAntonio Because I neither have a windows or osx machine and I want to put this in a pipeline to not need to do this manually every time. It's something that can be automated very easily.

@YasserAntonio Because I neither have a windows or osx machine and I want to put this in a pipeline to not need to do this manually every time. It's something that can be automated very easily.
Owner

The arm images seem to work now. You should be able to use them just like you would on other platforms, by running docker run vikunja/api and docker run vikunja/frontend etc.

Closing this issue as resolved, feel free to reopen if you feel it is not resolved.

The arm images seem to work now. You should be able to use them just like you would on other platforms, by running `docker run vikunja/api` and `docker run vikunja/frontend` etc. Closing this issue as resolved, feel free to reopen if you feel it is not resolved.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1717
No description provided.