Raspberry pi 树莓皮上的卡佩尔特桥

Raspberry pi 树莓皮上的卡佩尔特桥,raspberry-pi,docker-compose,google-home,home-automation,Raspberry Pi,Docker Compose,Google Home,Home Automation,我正在尝试使用以下指南在Raspberry Pi 3 B型上安装: 我已使用此生成器生成docker-compose.yml: . 我使用自己的MySQL和MQTT服务器,但Redis在Docker内部。 然后将redis图像从“redis:4”更改为“hypriot/rpi redis:latest” 这是我的docker-compose.yml: version: '3' networks: backend: driver: bridge web_frontend:

我正在尝试使用以下指南在Raspberry Pi 3 B型上安装:

我已使用此生成器生成docker-compose.yml: . 我使用自己的MySQL和MQTT服务器,但Redis在Docker内部。 然后将redis图像从“redis:4”更改为“hypriot/rpi redis:latest”

这是我的docker-compose.yml:

version: '3'
networks:
   backend:
      driver: bridge
   web_frontend:
      driver: bridge
services:
   web:
      image: 'pkap/gbridge-web:latest'
      restart: always
      ports:
         - '8082:80'
      environment:
         APP_ENV: production
         APP_KEY: [secret]
         APP_DEBUG: 'false'
         APP_LOG_LEVEL: warning
         APP_URL: 'http://localhost'
         DB_CONNECTION: mysql
         DB_HOST: 192.168.1.92
         DB_PORT: '3306'
         DB_DATABASE: gbridge
         DB_USERNAME: gbridge
         DB_PASSWORD: [secret]
         BROADCAST_DRIVER: log
         CACHE_DRIVER: file
         SESSION_DRIVER: file
         SESSION_LIFETIME: 120
         QUEUE_DRIVER: sync
         REDIS_HOST: cache
         REDIS_PASSWORD: 'null'
         REDIS_PORT: '6379'
         MAIL_DRIVER: smtp
         MAIL_HOST: ERROR
         MAIL_PORT: ERROR
         MAIL_USERNAME: ERROR
         MAIL_PASSWORD: ERROR
         MAIL_ENCRYPTION: ERROR
         GOOGLE_CLIENTID: [secret]
         GOOGLE_PROJECTID: [secret]
      links:
         - cache
      depends_on:
         - cache
      networks:
         - web_frontend
         - backend
   redis-worker:
      image: 'pkap/gbridge-redis-worker:latest'
      restart: always
      environment:
         GBRIDGE_REDISWORKER_REDIS: 'redis://cache:6379'
         GBRIDGE_REDISWORKER_MQTT: 'mqtt://192.168.1.93:1883'
         GBRIDGE_REDISWORKER_MQTTUSER: gbridge
         GBRIDGE_REDISWORKER_MQTTPASSWORD: [secret]
         GBRIDGE_REDISWORKER_HOMEGRAPHKEY: [secret]
      networks:
         - backend
      links:
         - cache
      depends_on:
         - cache
   cache:
      image: 'hypriot/rpi-redis:latest'
#      image: 'redis:4'
      restart: always
      expose:
         - '6379'
      networks:
         - backend
启动时,我得到以下输出:

pi@PI5:/opt/gbridge $ sudo docker-compose up
Creating network "gbridge_web_frontend" with driver "bridge"
Creating network "gbridge_backend" with driver "bridge"
Pulling web (pkap/gbridge-web:latest)...
latest: Pulling from pkap/gbridge-web
5e6ec7f28fb7: Pull complete
cf165947b5b7: Pull complete
7bd37682846d: Pull complete
99daf8e838e1: Pull complete
ae320713efba: Pull complete
ebcb99c48d8c: Pull complete
9867e71b4ab6: Pull complete
936eb418164a: Pull complete
dfa2ee5b92b5: Pull complete
1d7c2c4e167c: Pull complete
6cca41ef2bb3: Pull complete
bef66d80d31c: Pull complete
a8f43605d68c: Pull complete
47d407538c8d: Pull complete
c2797628ac4c: Pull complete
a34d45d05e93: Pull complete
2fe5576814be: Pull complete
a063192606ae: Pull complete
a37fa9e3ac80: Pull complete
caca02ee174f: Pull complete
a09b4aa1d2d4: Pull complete
054e4215a923: Pull complete
65491e91c688: Pull complete
ab9be62f37ed: Pull complete
3d758b0e9492: Pull complete
a9e75786a08e: Pull complete
b8f6d39ac5c2: Pull complete
e54728c3516e: Pull complete
ea7523212e8f: Pull complete
a6372d49dd57: Pull complete
a855663b44bc: Pull complete
Creating gbridge_cache_1 ... done
Creating gbridge_redis-worker_1 ... done
Creating gbridge_web_1          ... done
Attaching to gbridge_cache_1, gbridge_redis-worker_1, gbridge_web_1
redis-worker_1  | standard_init_linux.go:207: exec user process caused "exec format error"
web_1           | standard_init_linux.go:207: exec user process caused "exec format error"
cache_1         | 1:C 26 Jan 14:29:17.537 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
cache_1         | 1:M 26 Jan 14:29:17.548 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
cache_1         |                 _._                                                  
cache_1         |            _.-``__ ''-._                                             
cache_1         |       _.-``    `.  `_.  ''-._           Redis 3.0.0 (00000000/0) 32 bit
cache_1         |   .-`` .-```.  ```\/    _.,_ ''-._                                   
cache_1         |  (    '      ,       .-`  | `,    )     Running in standalone mode
cache_1         |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
cache_1         |  |    `-._   `._    /     _.-'    |     PID: 1
cache_1         |   `-._    `-._  `-./  _.-'    _.-'                                   
cache_1         |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
cache_1         |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
cache_1         |   `-._    `-._`-.__.-'_.-'    _.-'                                   
cache_1         |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
cache_1         |  |    `-._`-._        _.-'_.-'    |                                  
cache_1         |   `-._    `-._`-.__.-'_.-'    _.-'                                   
cache_1         |       `-._    `-.__.-'    _.-'                                       
cache_1         |           `-._        _.-'                                           
cache_1         |               `-.__.-'                                               
cache_1         | 
cache_1         | 1:M 26 Jan 14:29:17.551 # Server started, Redis version 3.0.0
cache_1         | 1:M 26 Jan 14:29:17.551 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
cache_1         | 1:M 26 Jan 14:29:17.551 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
cache_1         | 1:M 26 Jan 14:29:17.551 * The server is now ready to accept connections on port 6379
gbridge_redis-worker_1 exited with code 1
redis-worker_1  | standard_init_linux.go:207: exec user process caused "exec format error"
redis-worker_1  | standard_init_linux.go:207: exec user process caused "exec format error"
redis-worker_1  | standard_init_linux.go:207: exec user process caused "exec format error"
gbridge_web_1 exited with code 1
gbridge_redis-worker_1 exited with code 1
gbridge_redis-worker_1 exited with code 1
gbridge_web_1 exited with code 1
gbridge_redis-worker_1 exited with code 1
Exception in thread Thread-10:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/docker/api/client.py", line 256, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localhost/v1.25/containers/7dee1246e16ca1e28d703e4fe1ab0e1da958741d0fd6562e429da1bf8b291a61/attach?stream=1&logs=0&stderr=1&stdout=1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.5/dist-packages/compose/cli/log_printer.py", line 233, in watch_events
    event['container'].attach_log_stream()
  File "/usr/local/lib/python3.5/dist-packages/compose/container.py", line 215, in attach_log_stream
    self.log_stream = self.attach(stdout=True, stderr=True, stream=True)
  File "/usr/local/lib/python3.5/dist-packages/compose/container.py", line 307, in attach
    return self.client.attach(self.id, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/docker/api/container.py", line 61, in attach
    response, stream, self._check_is_tty(container), demux=demux)
  File "/usr/local/lib/python3.5/dist-packages/docker/api/client.py", line 395, in _read_from_socket
    socket = self._get_raw_response_socket(response)
  File "/usr/local/lib/python3.5/dist-packages/docker/api/client.py", line 306, in _get_raw_response_socket
    self._raise_for_status(response)
  File "/usr/local/lib/python3.5/dist-packages/docker/api/client.py", line 258, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 409 Client Error: Conflict ("b'container 7dee1246e16ca1e28d703e4fe1ab0e1da958741d0fd6562e429da1bf8b291a61 is restarting, wait until the container is running'")

gbridge_web_1 exited with code 1

您试图调用的图像名称不支持Raspberry Pi 3的芯片架构:

redis-worker_1 | standard_init_linux.go:207:exec用户进程导致“exec格式错误” web_1 | standard_init_linux.go:207:exec用户进程导致“exec格式错误”

您可以通过在
docker compose.yml
中调用这些包来解决此问题:

  • pkap/gbridge redis worker:arm32v6最新版本
  • pkap/gbridge web fpm:arm32v6最新版本
我遇到了同样的问题,看