iptables error while building docker image on raspberry pi (linux/ARM)

0

I have docker and docker-compose installed on my raspberry pi. While trying to build the following a docker-compose.yml I receive the an ip tables error during the building of a (linux/arm ported) mysql image.

docker-compose.yml:

version: '2'
services:
  crawler:
    container_name: crawler
    depends_on:
      - mysql
    build: ./crawler
  dns:
    container_name: dns
    depends_on:
      - mysql
    build: ./dns
    ports:
      - 5053:53/tcp
      - 5053:53/udp
  mysql:
    container_name: mysql
    restart: always
    image: hypriot/rpi-mysql:latest
    environment:
      MYSQL_ROOT_PASSWORD: 'test_pass'
      MYSQL_PASSWORD: 'test_pass'
      MYSQL_USER: 'user'
      MYSQL_DATABASE: 'db'

    volumes:
      - data-volume:/var/lib/mysql
    ports:
      - "3306:3306"
    expose:
      - '3306'
volumes:
  data-volume:

error:

ERROR: for mysql  Cannot start service mysql: b'driver failed programming external 
connectivity on endpoint 1fbcdc69860b_mysql (110b4b2dc5ea028af72136d3ea1776a44dd9420b6617264b88357231335bb853):  
(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-destination 172.18.0.2:3306 ! -i br-537bb705ad31: 
iptables: No chain/target/match by that name.\n (exit status 1))'
ERROR: Encountered errors while bringing up the project.

Ryan Lingle

Posted 2019-05-27T15:22:36.010

Reputation: 1

Answers

0

The trouble could it be for several reasons but the most accurate are the following ones: The docker-composed.yml file is presenting some configuration that is Being blocked by ip-tables rules for that reason Raspberry Pí is not able to have conectivity with remote sql server database, so firewall rules have to be reviewed. The second reason could it be due that Raspberry Pí has some customized files by default to create docker-composed images, so to create that One seems to be better to download The file of an repespetive resgistered Raspberry Pí repository, in this way is possible to avoid troubles. The next file presents some helpful information: https://docs.linksmart.eu/display/LOF/Installation+with+docker+on+a+raspberry+pi+3

user1039968

Posted 2019-05-27T15:22:36.010

Reputation: