[tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

ipro
Posts: 13
Joined: Sun Sep 01, 2019 3:52 am
Location: Jarosławiec

Sun Dec 01, 2019 10:13 pm

Czekaj czekaj, to jest output z hosta, czy z przebiegu docker build dla supla-scripts? Widzę, że tam obraz bazuje na Stretch.
djack2017
Posts: 322
Joined: Mon Nov 27, 2017 7:36 am

Sun Dec 01, 2019 10:24 pm

Wersje docker i docker-compose są jak wyżej u @ipro. Obraz budowany z Dockerfile bazuje na stretch'u
Wstawiałem też apt-get clean i upgrade ale bez zmian.
ipro
Posts: 13
Joined: Sun Sep 01, 2019 3:52 am
Location: Jarosławiec

Sun Dec 01, 2019 10:44 pm

Odpaliłem przed chwilą u siebie na rpi4 / Buster build obrazu "na świeżo" - faza, która u Ciebie rzuca błędem, przeszła bez problemów:

Code: Select all

root@raspberrypi:~/supla-scripts/docker# docker build --no-cache .
Sending build context to Docker daemon  83.46kB
Step 1/10 : FROM php:7.1.27-apache-stretch
 ---> 42b69c7f2cf1
Step 2/10 : WORKDIR /var/www
 ---> Running in f83295520924
Removing intermediate container f83295520924
 ---> e6a7d22cb991
Step 3/10 : RUN apt-get update     && apt-get install -y --no-install-recommends       libicu-dev       libpq-dev       ca-certificates       ssl-cert       libcurl4-gnutls-dev       git       unzip       mysql-client       supervisor       cron       wget       zlib1g-dev     && update-ca-certificates     && docker-php-ext-install       pdo_mysql       opcache       curl       zip     && apt-get autoremove     && rm -r /var/lib/apt/lists/*
 ---> Running in e0719a5feb57
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2365 B]
Get:6 http://security-cdn.debian.org/debian-security stretch/updates/main armhf Packages [487 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main armhf Packages [27.9 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main armhf Packages [6915 kB]
Fetched 7735 kB in 6s (1191 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20161130+nmu1+deb9u1).
The following additional packages will be installed:
  default-mysql-client git-man icu-devtools libaio1 libconfig-inifiles-perl
  libcurl3-gnutls liberror-perl libicu57 libjemalloc1 libpq5 libpython-stdlib
  libpython2.7-minimal libpython2.7-stdlib libreadline5 libreadline7
  mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mysql-common
  python python-meld3 python-minimal python-pkg-resources python2.7
  python2.7-minimal readline-common
Suggested packages:
  anacron logrotate checksecurity gettext-base git-daemon-run
  | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch
  git-cvs git-mediawiki git-svn libcurl4-doc libcurl3-dbg libgnutls28-dev
  libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev icu-doc
  postgresql-doc-9.6 python-doc python-tk python-setuptools python2.7-doc
  binfmt-support readline-doc openssl-blacklist supervisor-doc zip
Recommended packages:
  exim4 | postfix | mail-transport-agent less rsync ssh-client
  libdbd-mysql-perl libdbi-perl libterm-readkey-perl
The following NEW packages will be installed:
  cron default-mysql-client git git-man icu-devtools libaio1
  libconfig-inifiles-perl libcurl3-gnutls libcurl4-gnutls-dev liberror-perl
  libicu-dev libjemalloc1 libpq-dev libpq5 libpython-stdlib
  libpython2.7-minimal libpython2.7-stdlib libreadline5 libreadline7
  mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mysql-client
  mysql-common python python-meld3 python-minimal python-pkg-resources
  python2.7 python2.7-minimal readline-common ssl-cert supervisor unzip wget
  zlib1g-dev
The following packages will be upgraded:
  libicu57
1 upgraded, 36 newly installed, 0 to remove and 27 not upgraded.
Need to get 45.5 MB of archives.
After this operation, 174 MB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main armhf cron armhf 3.0pl1-128+deb9u1 [92.3 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libpython2.7-minimal armhf 2.7.13-2+deb9u3 [389 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python2.7-minimal armhf 2.7.13-2+deb9u3 [1176 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python-minimal armhf 2.7.13-2 [40.5 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main armhf readline-common all 7.0-3 [70.4 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libreadline7 armhf 7.0-3 [131 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libpython2.7-stdlib armhf 2.7.13-2+deb9u3 [1821 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python2.7 armhf 2.7.13-2+deb9u3 [285 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libpython-stdlib armhf 2.7.13-2 [20.0 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python armhf 2.7.13-2 [154 kB]
Get:11 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libcurl3-gnutls armhf 7.52.1-5+deb9u9 [262 kB]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch/main armhf liberror-perl all 0.17024-1 [26.9 kB]
Get:13 http://cdn-fastly.deb.debian.org/debian stretch/main armhf git-man all 1:2.11.0-3+deb9u4 [1433 kB]
Get:14 http://cdn-fastly.deb.debian.org/debian stretch/main armhf git armhf 1:2.11.0-3+deb9u4 [3661 kB]
Get:15 http://cdn-fastly.deb.debian.org/debian stretch/main armhf wget armhf 1.18-5+deb9u3 [781 kB]
Get:16 http://cdn-fastly.deb.debian.org/debian stretch/main armhf mysql-common all 5.8+1.0.2 [5608 B]
Get:17 http://cdn-fastly.deb.debian.org/debian stretch/main armhf mariadb-common all 10.1.41-0+deb9u1 [28.5 kB]
Get:18 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libaio1 armhf 0.3.110-3 [9286 B]
Get:19 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libreadline5 armhf 5.2+dfsg-3+b1 [103 kB]
Get:20 http://cdn-fastly.deb.debian.org/debian stretch/main armhf mariadb-client-core-10.1 armhf 10.1.41-0+deb9u1 [4403 kB]
Get:21 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libconfig-inifiles-perl all 2.94-1 [53.4 kB]
Get:22 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libjemalloc1 armhf 3.6.0-9.1 [82.9 kB]
Get:23 http://cdn-fastly.deb.debian.org/debian stretch/main armhf mariadb-client-10.1 armhf 10.1.41-0+deb9u1 [5477 kB]
Get:24 http://cdn-fastly.deb.debian.org/debian stretch/main armhf default-mysql-client all 1.0.2 [3050 B]
Get:25 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libicu57 armhf 57.1-6+deb9u3 [7455 kB]
Get:26 http://cdn-fastly.deb.debian.org/debian stretch/main armhf icu-devtools armhf 57.1-6+deb9u3 [163 kB]
Get:27 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libcurl4-gnutls-dev armhf 7.52.1-5+deb9u9 [349 kB]
Get:28 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libicu-dev armhf 57.1-6+deb9u3 [15.9 MB]
Get:29 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libpq5 armhf 9.6.15-0+deb9u1 [123 kB]
Get:30 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libpq-dev armhf 9.6.15-0+deb9u1 [198 kB]
Get:31 http://cdn-fastly.deb.debian.org/debian stretch/main armhf mysql-client armhf 5.5.9999+default [1700 B]
Get:32 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python-pkg-resources all 33.1.1-1 [166 kB]
Get:33 http://cdn-fastly.deb.debian.org/debian stretch/main armhf ssl-cert all 1.0.39 [20.8 kB]
Get:34 http://cdn-fastly.deb.debian.org/debian stretch/main armhf unzip armhf 6.0-21+deb9u2 [159 kB]
Get:35 http://cdn-fastly.deb.debian.org/debian stretch/main armhf zlib1g-dev armhf 1:1.2.8.dfsg-5 [200 kB]
Get:36 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python-meld3 all 1.0.2-2 [37.3 kB]
Get:37 http://cdn-fastly.deb.debian.org/debian stretch/main armhf supervisor all 3.3.1-1+deb9u1 [280 kB]
...
User avatar
lesny8
Posts: 870
Joined: Mon Dec 11, 2017 9:43 pm

Sun Dec 01, 2019 10:54 pm

djack2017 wrote:
Sun Dec 01, 2019 9:45 pm
Get:4 http://deb.debian.org/debian stretch/main armhf python-minimal armhf 2.7.13-2 [40.5 kB]
ipro wrote:
Sun Dec 01, 2019 10:44 pm
Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main armhf python-minimal armhf 2.7.13-2 [40.5 kB]
ipro
Posts: 13
Joined: Sun Sep 01, 2019 3:52 am
Location: Jarosławiec

Sun Dec 01, 2019 10:58 pm

Tam jest chyba httpredir pod spodem, o ile się nie mylę. Adres źródłowy dobierany na podstawie geolokalizacji:

Code: Select all

root@8c3dc1d87fc4:/var/www# curl -I http://deb.debian.org/debian
HTTP/1.1 302 Found
Date: Sun, 01 Dec 2019 22:56:24 GMT
Server: Apache
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Referrer-Policy: no-referrer
X-Xss-Protection: 1
Location: http://cdn-fastly.deb.debian.org/debian
Content-Type: text/html; charset=iso-8859-1
Może któryś mirror Debiana nawala?...
djack2017
Posts: 322
Joined: Mon Nov 27, 2017 7:36 am

Tue Dec 03, 2019 9:27 am

Na nowym czystym raspbianie też wywala błedy.
Natomiast trzeba zmodyfikować plik Dockerfile (@fracz) - dołożyć na początku dwie linie i wszystko działa jak należy:

Code: Select all

FROM php:7.1.27-apache-stretch

WORKDIR /var/www

RUN echo 'deb http://cdn-fastly.deb.debian.org/debian stretch main contrib non-free' >> /etc/apt/sources.list
RUN echo 'deb-src http://cdn-fastly.deb.debian.org/debian stretch main contrib non-free' >> /etc/apt/sources.list

kris.sg
Posts: 125
Joined: Mon Aug 07, 2017 8:08 pm
Location: Przezchlebie

Wed Dec 04, 2019 1:19 pm

Jestem na etapie instalowania do rpi4 supla-docker
na razie szło bez problemów ale utknąłem w tym miejscu:

Code: Select all

pi@raspberrypi:~ $ ./supla-docker/supla.sh start
Starting SUPLA containers
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
pi@raspberrypi:~ $ docker -v && docker-compose -v
Docker version 19.03.5, build 633a0ea
docker-compose version 1.25.0, build b42d419
pi@raspberrypi:~ $ 
ipro
Posts: 13
Joined: Sun Sep 01, 2019 3:52 am
Location: Jarosławiec

Wed Dec 04, 2019 1:40 pm

kris.sg wrote:
Wed Dec 04, 2019 1:19 pm
Jestem na etapie instalowania do rpi4 supla-docker
na razie szło bez problemów ale utknąłem w tym miejscu:
Tu znajdziesz informacje, jak zarządzać Dockerem z użytkownika nie będącego root-em:
https://docs.docker.com/install/linux/l ... stinstall/

Alternatywnie, wykonaj całość z root-a. Efekt osiągniesz ten sam. Pełny "Root-less mode" dla Dockera jest wciąż w fazie eksperymentów.
User avatar
lesny8
Posts: 870
Joined: Mon Dec 11, 2017 9:43 pm

Wed Dec 04, 2019 3:15 pm

kris.sg wrote:
Wed Dec 04, 2019 1:19 pm
Jestem na etapie instalowania do rpi4 supla-docker
na razie szło bez problemów ale utknąłem w tym miejscu:

Code: Select all

pi@raspberrypi:~ $ ./supla-docker/supla.sh start
Starting SUPLA containers
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
pi@raspberrypi:~ $ docker -v && docker-compose -v
Docker version 19.03.5, build 633a0ea
docker-compose version 1.25.0, build b42d419
pi@raspberrypi:~ $ 
Dodaj użytkownika pi do grupy docker a potem przeloguj albo zrób reboot.
Post Reply