Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec format error during docker compose up #4527

Open
larsrinn opened this issue Jan 29, 2025 · 7 comments
Open

exec format error during docker compose up #4527

larsrinn opened this issue Jan 29, 2025 · 7 comments

Comments

@larsrinn
Copy link

For me docker compose up yields these errors:

omnivore-image-proxy      | exec /app/start_imageproxy.sh: exec format error
omnivore-migrate          | exec /usr/local/bin/docker-entrypoint.sh: exec format error

I'm running on Raspberry PI, maybe it's got something to do with the arm64-Architecture? I can try do dig into this later this week.

@Podginator
Copy link
Contributor

Hey!

Yeah this will be due to the ARM64. There should be a folder in the same directory that contains another docker compose file - this one let’s you build the images yourself which will compile it for the raspberry pi.

@Podginator
Copy link
Contributor

I’ll look at also publishing an arm64 image to ease this

@Podginator
Copy link
Contributor

In the meantime, you can replace the docker-compose file with the following... This will build everything for the target platform, and thus should work. Let me know. I am looking into building all the images as multi-platform and will try to create a PR soon.

version: '3'
x-postgres:
  &postgres-common
  image: "ankane/pgvector:v0.5.1"
  user: postgres
  healthcheck:
    test: "exit 0"
    interval: 2s
    timeout: 12s
    retries: 3

services:
  postgres:
    <<: *postgres-common
    container_name: "omnivore-postgres"
    volumes:
      - pgdata:/var/lib/postgresql/data
    env_file:
      - .env

  migrate:
    build:
      context: ../../
      dockerfile: ./packages/db/Dockerfile
    container_name: "omnivore-migrate"
    command: '/bin/sh ./packages/db/setup.sh' # Also create a demo user with email: [email protected], password: demo_password
    env_file:
      - .env
    depends_on:
      postgres:
        condition: service_healthy

  api:
    build:
      context: ../../
      dockerfile: ./packages/api/Dockerfile
    container_name: "omnivore-api"
    ports:
      - "4000:8080"
    healthcheck:
      test: ["CMD-SHELL", "nc -z 0.0.0.0 8080 || exit 1"]
      interval: 15s
      timeout: 90s
      retries: 6
    env_file:
      - .env
    depends_on:
      migrate:
        condition: service_completed_successfully

  queue-processor:
    build:
      context: ../../
      dockerfile: ./packages/api/queue-processor/Dockerfile
    container_name: "omnivore-queue-processor"
    env_file:
      - .env
    depends_on:
      api:
        condition: service_started

  web:
    build:
      context: ../../
      dockerfile: ./packages/web/Dockerfile-self
      args:
        - APP_ENV=prod
        - BASE_URL=http://localhost:3000
        - SERVER_BASE_URL=http://localhost:4000
        - HIGHLIGHTS_BASE_URL=http://localhost:3000
        - USE_NATIVE_PDF=true
    container_name: "omnivore-web"
    ports:
      - "3000:8080"
    env_file:
      .env
    depends_on:
      api:
        condition: service_healthy

  image-proxy:
    build:
      context: ../../imageproxy
      dockerfile: ./Dockerfile
    container_name: "omnivore-image-proxy"
    ports:
      - "7070:8080"
    env_file:
      - .env

  content-fetch:
    build:
      context: ../../
      dockerfile: ./packages/content-fetch/Dockerfile
    container_name: "omnivore-content-fetch"
    ports:
      - "9090:8080"
    environment:
      - USE_FIREFOX=true # Using Firefox here because the official chrome version seems to freeze a lot in Docker.
    env_file:
      - .env
    depends_on:
      redis:
        condition: service_healthy
      api:
        condition: service_healthy

  redis:
    image: "redis:7.2.4"
    container_name: "omnivore-redis"
    expose:
      - 6379
    ports:
      - "6379:6379"
    healthcheck:
      test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
    volumes:
      - redis_data:/data

  minio:
    image: minio/minio
    expose:
      - 1010
    ports:
      - "1010:9000"
    healthcheck:
      test: [ "CMD", "mc", "ready", "local" ]
      interval: 5s
      timeout: 1s
    environment:
      - "MINIO_ACCESS_KEY=minio"
      - "MINIO_SECRET_KEY=miniominio"
      - "AWS_S3_ENDPOINT_URL=http://minio:1010"
    command: server /data
    volumes:
      - minio_data:/data

  createbuckets:
    image: minio/mc
    environment:
      - MINIO_ACCESS_KEY=minio
      - MINIO_SECRET_KEY=miniominio
      - BUCKET_NAME=omnivore
      - ENDPOINT=http://minio:9000
      - AWS_S3_ENDPOINT_URL=http://minio:9000
    depends_on:
      - minio
    entrypoint: >
      /bin/bash -c "
      sleep 5;
      until (/usr/bin/mc config host add myminio http://minio:9000 minio miniominio) do echo '...waiting...' && sleep 1; done;
      /usr/bin/mc mb myminio/omnivore;
      /usr/bin/mc policy set public myminio/omnivore;
      exit 0;
      "
  mail-watch-server:
    build:
      context: ../../
      dockerfile: ./packages/local-mail-watcher/Dockerfile
    container_name: "omnivore-mail-watch-server"
    ports:
      - "4398:8080"
    env_file:
      - .env
    depends_on:
      redis:
        condition: service_healthy


volumes:
  pgdata:
  redis_data:
  minio_data:

@Podginator
Copy link
Contributor

Could you do me a favour, and try to run again? I have built some multi-arch versions.

@samiralam
Copy link

@Podginator related question, are there any plans to publish a prebuilt omnivore-web image that we can pull directly?

@larsrinn
Copy link
Author

larsrinn commented Feb 4, 2025

@Podginator you're doing me the favor. The pulled images run fine now. However, building of the web-Image fails:

failed to solve: process "/bin/sh -c apk add g++ make python3 py3-setuptools" did not complete successfully: exit code: 4

@Podginator
Copy link
Contributor

I'm trying to create a omnivore-web image now. Can you checkout the web-image branch and try it out?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants