0

I want to install Redmine in Docker. I followed this tutorial. When I tried with Postresql

docker run --name=postgresql-redmine -d \
  --env='DB_NAME=redmine_production' \
  --env='DB_USER=redmine' --env='DB_PASS=password' \
  --volume=/srv/docker/redmine/postgresql:/var/lib/postgresql \
  sameersbn/postgresql:9.6-2

docker run --name=redmine -d \
  --link=postgresql-redmine:postgresql --publish=10083:80 \
  --env='REDMINE_PORT=10083' \
  --volume=/srv/docker/redmine/redmine:/home/redmine/data \
  sameersbn/redmine:3.3.2-1

I got the following error message:

docker: Error response from daemon: Cannot link to a non running container: /postgresql-redmine AS /redmine/postgresql-redmine.

And when I try with MySQL:

docker run --name=mysql-redmine -d \
  --volume=/srv/docker/redmine/mysql:/var/lib/mysql \
  sameersbn/mysql:latest

docker run --name=redmine -it --rm \
  --env='DB_ADAPTER=mysql2' \
  --env='DB_HOST=192.168.1.100' --env='DB_NAME=redmine_production' \
  --env='DB_USER=redmine' --env='DB_PASS=password' \
  --volume=/srv/docker/redmine/redmine:/home/redmine/data \
  sameersbn/redmine:3.3.2-1

I don't get error message, but I can't reach it (not in port 3000 and not in port 10083, too)

What's missing?

EDIT: Output of docker ps -a

CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS                   PORTS               NAMES
3b0d0631080f        sameersbn/mysql:latest   "/sbin/entrypoint...."   3 hours ago         Exited (1) 3 hours ago   

Output of docker logs 3b0d0631080f

standard_init_linux.go:178: exec user process caused "exec format error"
Feralheart
  • 1,881
  • 5
  • 28
  • 59

2 Answers2

0

Raspberry Pi has the ARM architecture. Therefore you can't use "normal" images. I am new to this topic, but this blog post was interesting.

I suppose that it could be possible to build the required docker images on your own by taking the Dockerfile and replacing the base image with a ARM compatible ubuntu image (armhf/ubuntu) one.

If you want to give it a try:

  • Download the Dockerfile
  • Replace FROM sameersbn/ubuntu:14.04.20170123 with FROM armhf/ubuntu
  • Run docker build . in the folder of the edited Dockerfile

This is only guessing, but I am interested if it works.

adebasi
  • 3,535
  • 2
  • 19
  • 33
  • Nope. I can launch PG 9.6 on raspbian just fine and it runs just fine. If I have my own image built from a Dockerfile which **only has** `FROM postgres:9.6`, then this error occurs. – Michael M Dec 06 '17 at 23:20
0

coz I prefer to work with docker-compose files, here is m working config - just put it into the docker-compose.yml file and then run docker-compose up. PS: note there are mapped volumes (folders) for plugins, themes, files and db data. I'm using this image for Redmine development and it works very well.

version: '3.3'

services:

  redmine:
    image: redmine:passenger
    container_name: redmine
    volumes:
      - ./redmine/plugins:/usr/src/redmine/plugins
      - ./redmine/themes:/usr/src/redmine/public/themes
      - ./redmine/files:/usr/src/redmine/files
    restart: always
    ports:
      - 80:3000
    environment:
      REDMINE_DB_MYSQL: db
      REDMINE_DB_PASSWORD: db_password
      REDMINE_PLUGINS_MIGRATE: 1

  db:
    image: mariadb
    container_name: redmine-db
    volumes:
      - ./db/data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: db_password
      MYSQL_DATABASE: redmine

If you need more info, I can help :)

Maxim Krušina
  • 739
  • 8
  • 10