Docker-compose example for RPI 4

Hi,
I’m farmOS noob and trying to run farmOS on RPI4 using docker and docker-compose.

I’ve tried with farmos docker image versions ‘latest’ and ‘2.x’ but I’ve got below error:

exec /usr/local/bin/docker-entrypoint.sh: exec format error

my noob points are:

  • is possible run farmOS on arm64?
  • is there a docker command example to run on RPI4?
2 Likes

Yes it is, but there are currently no docker images available for arm64 so you need to build them yourself.

Here is my process.

It may not be 100% complete and could probably do with a few bits updated but should get you going.
Any gaps I’m sure can be filled in here.

3 Likes

And for reference, here is a link to the issue we have that will enable building arm64 images of farmOS: Use GitHub Actions to build Docker Hub images [#3203129] | Drupal.org

3 Likes

Thaks a lot @Farmer-Ed, with the step-by-step I could install farmOS, but after wait almost a hour I got the error below in browser.

Forbidden

You don’t have permission to access this resource.

I’ve tried:

  • delete www folder and containers and after reinstall
  • grant chmod 777 to www folder recursively
  • at least run containers without bind volumes

farmOS container logs

Attempting: apache2-foreground
[Wed Aug 17 23:41:23.204390 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.54 (Debian) configured – resuming normal operations
[Wed Aug 17 23:41:23.204678 2022] [core:notice] [pid 1] AH00094: Command line: ‘apache2 -D FOREGROUND’
[17/Aug/2022:23:50:17 +0000] “GET /test HTTP/1.1” 404 495 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36”

[17/Aug/2022:23:51:08 +0000] “-” 408 0 “-” “-”
[Wed Aug 17 23:53:03.684663 2022] [autoindex:error] [pid 22] [client AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
[17/Aug/2022:23:53:03 +0000] “GET / HTTP/1.1” 403 498 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36”
[17/Aug/2022:23:53:55 +0000] “-” 408 0 “-” “-”

How far did you get in the install? Just the docker image built or got through the Drupal install steps?

what dose your docker-compose.yml look like?

Hi @Farmer-Ed,
I followed the step-by-step:

  • docker instalation
  • docker compose
    after
  • git instalation
  • git clone…
  • folder creation farmOS/docker
  • farmos build
    after
  • farmos folder creation under my user folder
  • copy and past the docker_compose example

but after docker_copose up -d commnad, I got the mentioned error.

the only modification that I did on docker-compose was the host port number from 80 to 8000. as ‘8000:80’

1 Like

Ah crap…
Try this one, I pushed an image to Docker Hub as well so should get you going
you can change ports and passwords as you need

version: '3'
services:
  db:
    image: postgres:12
    volumes:
      - './db:/var/lib/postgresql/data'
    ports:
      - '5432:5432'
    environment:
      POSTGRES_USER: farm
      POSTGRES_PASSWORD: farm
      POSTGRES_DB: farm

  www:
    depends_on:
      - db
    image: farmered/farmos:2.0.0-beta6
    volumes:
      - './www:/opt/drupal/sites'
    ports:
      - '80:80'

@mstena hope you don’t mind if I push some ARM64 images to Docker hub
https://hub.docker.com/repository/docker/farmered/farmos

2 Likes

Latest Beta7 Release built for ARM64 Docker Hub

3 Likes

Update: we are now using GitHub Actions to build and publish our Docker images to Docker Hub! :tada:

This was one of the prerequisites for building/pushing official farmOS Docker images for ARM64 / Raspberry Pi.

If anyone is interested in helping with that next step, here is the official tracking issue: Build official ARM64 Docker images [#3322762] | Drupal.org

2 Likes