docker containers: mariaDB connection issue with nextcloud - docker

I'm the super user at my maschine. There is docker inside my volumne (/volume1/docker). I pulled the latest version of the images and run MariaDB, PhpMyAdmin and NextCloud:
docker run -d --name mariadb --network nextcloud --network-alias db -e MYSQL_ROOT_PASSWORD=r00tp#ss -e MYSQL_USER=nextcloud_rw -e MYSQL_PASSWORD=N3xtCl0ud! -e MYSQL_DATABASE=nextcloud -v /volume1/docker/mariadb:/var/lib/mysql --restart=unless-stopped mariadb:latest
docker run -d --name phpmyadmin --network nextcloud --link mariadb:db -e PMA_ARBITRARY=1 -e PMA_HOST=db -e PMA_USER=nextcloud_rw -e PMA_PASSWORD=N3xtCl0ud! -p 8082:80 --restart=unless-stopped phpmyadmin:latest
docker run -d --name nextcloud --network nextcloud -e MYSQL_HOST=db -e MYSQL_DATABASE=nextcloud -e MYSQL_USER=nextcloud_rw -e MYSQL_PASSWORD=N3xtCl0ud! -v /volume1/docker/nextcloud:/var/www/html -v db:/var/lib/mysql --restart=unless-stopped -p 8080:80 nextcloud:latest
When I open the browser and navigate to http:\\whereNextCloudLives:8080, I see the NextClud background plus the installation form. I enter the user nextcloud and the pw N3xtCl0ud! and get the response "Please check your mysql credentials. Cannot connect to DB".
MariaDB-Log:
[Note] mariadbd: ready for connections.
[Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
[Note] [Entrypoint]: Giving user nextcloud_rw access to schema nextcloud
[Note] [Entrypoint]: Creating user nextcloud_rw
[Note] [Entrypoint]: Creating database nextcloud
[Note] [Entrypoint]: Temporary server started.
stderr Version: '10.9.3-MariaDB-1:10.9.3+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
[Note] mariadbd: ready for connections.
[Warning] Access denied for user 'nextcloud_rw'#'172.18.0.4' (using password: YES)
[Warning] Access denied for user 'nextcloud_rw'#'172.18.0.4' (using password: YES)
[Warning] Access denied for user 'nextcloud_rw'#'172.18.0.4' (using password: YES)
stderr Version: '10.9.3-MariaDB-1:10.9.3+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
NextCloud-Log:
442381598Z stdout 172.18.0.1 - - [02/Dec/2022:18:26:11 +0000] "POST /index.php HTTP/1.1" 200 3538 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
2022-12-02T18:26:11.300610626Z stdout 127.0.0.1 - - [02/Dec/2022:18:26:11 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.54 (Debian) PHP/8.0.24 (internal dummy connection)"
2022-12-02T18:26:05.648774341Z stdout 172.18.0.1 - - [02/Dec/2022:18:26:04 +0000] "GET /dist/core-common.js.map?v=dc4002698c876c22453e HTTP/1.1" 200 4483569 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
2022-12-02T18:26:04.864831573Z stdout 172.18.0.1 - - [02/Dec/2022:18:26:04 +0000] "GET /dist/core-main.js.map?v=0a05117109bf8b6240ea HTTP/1.1" 200 106976 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
2022-12-02T18:26:04.845899731Z stdout 172.18.0.1 - - [02/Dec/2022:18:26:04 +0000] "GET /core/vendor/zxcvbn/dist/zxcvbn.js.map HTTP/1.1" 404 680 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
2022-12-02T18:26:04.844799000Z stdout 172.18.0.1 - - [02/Dec/2022:18:26:04 +0000] "GET /dist/core-install.js.map?v=ee580b4e58a4177adf85 HTTP/1.1" 200 9627 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
2022-12-02T18:26:04.331553336Z stdout 172.18.0.1 - - [02/Dec/2022:18:26:04 +0000] "GET /core/img/manifest.json HTTP/1.1" 200 728 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
2022-12-02T18:25:47.268364543Z stderr [Fri Dec 02 18:25:47.267810 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
2022-12-02T18:25:47.268255142Z stderr [Fri Dec 02 18:25:47.267778 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.54 (Debian) PHP/8.0.24 configured -- resuming normal operations
2022-12-02T18:25:47.252431732Z stderr AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
2022-12-02T18:25:47.240345812Z stderr AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
I just use the IP. There is no domain configured. I've access to the DB with PhpMyAdmin.
Anyone with an idea what is wrong?

Related

Swagger UI is blank or empty when i try t connect it to kong.yaml

This is the swagger of port 8099 swagger of 8099 then after i connect it to kong kong swagger the tab name is changing to Swagger UI that means its working but its empty. Any Solution?
//kong.yaml for swagger
_format_version: "2.1"
_transform: true
services:
# ------ Swagger port -------
- host: host.docker.internal
port: 8099
name: swagger-service
path: /swagger-ui/index.html
routes:
- name: swagger-service
paths:
- /swagger
strip_path: true
After i enter the port http://localhost:8000/swagger this will show
kong | 172.24.0.1 - - [24/May/2022:07:48:11 +0000] "GET /favicon-16x16.png HTTP/1.1" 404 48 "http://localhost:8000/swagger" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53"

Can't access docker container via host browser. Ping is allowed

I created first time some containers via docker-compose in the same new network. After while the env is completed. I see running containers via docker ps. Normally after that i can use containers. But when I tried to access wordpress web page from host via localhost:20000 or :20000. I get ERR_Connection refused. I was expecting info about "Error connecnting to the database".I can ping the containers by docker containers ip from the host. So maybe someone know how to fix that and get access to them.
This happens with this new network - network_1. Other containers like pihole + portainer in default bridge network are accessible from whole host network.
Thank You.
version: '3'
services:
# Database
db:
image: linuxserver/mariadb
volumes:
- db_data:/var/lib/mysql
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: user
MYSQL_PASSWORD: password
networks:
- network_1
# phpmyadmin
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
restart: always
ports:
- 3308:80
environment:
PMA_HOST: 1
MYSQL_ROOT_PASSWORD: password
networks:
- network_1
# Wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- 20000:80
restart: always
volumes: ['./:/var/www/html']
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: user
WORDPRESS_DB_PASSWORD: password
networks:
- network_1
# Nextcloud
nextcloud:
image: nextcloud
restart: always
ports:
- 30000:80
depends_on:
- db
volumes:
- nextcloud:/var/www/html
environment:
MYSQL_PASSWORD: password
MYSQL_DATABASE: nextcloud
MYSQL_USER: user
MYSQL_HOST: db:3306
networks:
- network_1
networks:
network_1:
volumes:
db_data:
nextcloud:
Some commands from docker:
pi#raspberrypi:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
52d11a5c2931 wordpress:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:20000->80/tcp, :::20000->80/tcp
dom_wordpress_1
39feec5309d3 phpmyadmin/phpmyadmin "/docker-entrypoint.…" 2 hours ago Up 2 minutes 0.0.0.0:3308->80/tcp, :::3308->80/tcp
dom_phpmyadmin_1
62a943db01f2 nextcloud "/entrypoint.sh apac…" 2 hours ago Up 2 hours 0.0.0.0:30000->80/tcp, :::30000->80/tcp
dom_nextcloud_1
0681159165df linuxserver/mariadb "/init" 2 hours ago Up 2 hours 3306/tcp
dom_db_1
d0b6ece5c5aa portainer/portainer-ce:latest "/portainer" 4 hours ago Up 4 hours 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp
portainer
71ee89deb6de nginx:latest "/docker-entrypoint.…" 12 days ago Up 4 hours 0.0.0.0:80->80/tcp, :::80->80/tcp
nginx
03fcbea93e14 pihole/pihole:latest "/s6-init" 5 weeks ago Up 4 hours (unhealthy) 0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp, :::53->53/tcp, :::53->53/udp, 67/udp, 0.0.0.0:5000->80/tcp, :::5000->80/tcp, 0.0.0.0:5001->443/tcp, :::5001->443/tcp pihole
And docker inspect. !-No output for dom_db_1 and dom_phpmyadmin_1, and running pihole
pi#raspberrypi:~/docker-compose-Templates/dom $ docker port dom_db_1
pi#raspberrypi:~/docker-compose-Templates/dom $ docker port pihole
443/tcp -> 0.0.0.0:5001
443/tcp -> :::5001
53/tcp -> 0.0.0.0:53
53/tcp -> :::53
53/udp -> 0.0.0.0:53
53/udp -> :::53
80/tcp -> 0.0.0.0:5000
80/tcp -> :::5000
Logs from container wordpress(after rebuild-new ID) - it's working but VERY slow... In bridge network wordpress worked normally.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
[Fri Oct 22 13:36:25.354493 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.48 (Debian) PHP/7.4.23 configured -- resuming normal operations
[Fri Oct 22 13:36:25.354772 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
192.168.1.201 - - [22/Oct/2021:13:36:25 +0000] "GET / HTTP/1.1" 500 2834 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:00:21 +0000] "GET / HTTP/1.1" 302 408 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:01:13 +0000] "-" 408 0 "-" "-"
192.168.1.201 - - [22/Oct/2021:14:02:25 +0000] "GET / HTTP/1.1" 302 408 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:00:40 +0000] "GET /wp-admin/install.php HTTP/1.1" 200 2816 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:46 +0000] "GET /wp-includes/css/buttons.min.css?ver=5.8 HTTP/1.1" 200 1791 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:45 +0000] "GET /wp-includes/css/dashicons.min.css?ver=5.8 HTTP/1.1" 200 36068 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:46 +0000] "GET /wp-admin/css/forms.min.css?ver=5.8 HTTP/1.1" 200 6546 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:48 +0000] "GET /wp-admin/css/l10n.min.css?ver=5.8 HTTP/1.1" 200 1021 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:48 +0000] "GET /wp-admin/css/install.min.css?ver=5.8 HTTP/1.1" 200 2129 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:54 +0000] "GET /wp-includes/js/zxcvbn-async.min.js?ver=1.0 HTTP/1.1" 200 605 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:51 +0000] "GET /wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2 HTTP/1.1" 200 4520 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:49 +0000] "GET /wp-includes/js/jquery/jquery.min.js?ver=3.6.0 HTTP/1.1" 200 31261 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:55 +0000] "GET /wp-admin/images/wordpress-logo.svg?ver=20131107 HTTP/1.1" 200 1810 "http://raspberrypi:20000/wp-admin/css/install.min.css?ver=5.8" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:00 +0000] "GET /wp-includes/js/dist/hooks.min.js?ver=a7edae857aab69d69fa10d5aef23a5de HTTP/1.1" 200 2141 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:01 +0000] "GET /wp-includes/js/dist/i18n.min.js?ver=5f1269854226b4dd90450db411a12b79 HTTP/1.1" 200 4209 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:56 +0000] "GET /wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=3.15.0 HTTP/1.1" 200 6382 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:13:56 +0000] "GET /wp-includes/js/dist/vendor/regenerator-runtime.min.js?ver=0.13.7 HTTP/1.1" 200 2749 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:02 +0000] "GET /wp-admin/js/password-strength-meter.min.js?ver=5.8 HTTP/1.1" 200 970 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:02 +0000] "GET /wp-includes/js/underscore.min.js?ver=1.8.3 HTTP/1.1" 200 7670 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:02 +0000] "GET /wp-includes/js/wp-util.min.js?ver=5.8 HTTP/1.1" 200 1054 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:04 +0000] "GET /wp-admin/js/user-profile.min.js?ver=5.8 HTTP/1.1" 200 2637 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:05 +0000] "GET /favicon.ico HTTP/1.1" 302 407 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:06 +0000] "GET /wp-admin/install.php HTTP/1.1" 200 2815 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:14:05 +0000] "GET /wp-includes/js/zxcvbn.min.js HTTP/1.1" 200 400400 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:26:39 +0000] "-" 408 0 "-" "-"
172.18.0.1 - - [22/Oct/2021:14:26:53 +0000] "GET / HTTP/1.1" 500 2834 "-" "Mozilla/5.0 (X11; CrOS aarch64 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.98 Safari/537.36"
172.18.0.1 - - [22/Oct/2021:14:27:28 +0000] "GET /favicon.ico HTTP/1.1" 500 2834 "http://localhost:20000/" "Mozilla/5.0 (X11; CrOS aarch64 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.98 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:25:48 +0000] "POST /wp-admin/install.php?step=2 HTTP/1.1" 200 1789 "http://raspberrypi:20000/wp-admin/install.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:47:22 +0000] "GET /favicon.ico HTTP/1.1" 404 492 "http://raspberrypi:20000/wp-admin/install.php?step=2" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.1.201 - - [22/Oct/2021:14:50:43 +0000] "-" 408 0 "-" "-"
192.168.1.201 - - [22/Oct/2021:14:49:51 +0000] "GET /wp-login.php HTTP/1.1" 200 2539 "http://raspberrypi:20000/wp-admin/install.php?step=2" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
Logs from phpmyadmin(id may be changed after my actions)
pi#raspberrypi:~ $ docker container logs e569effa480c
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
standard_init_linux.go:228: exec user process caused: exec format error
I think
# Database
db:
image: linuxserver/mariadb
volumes:
- db_data:/var/lib/mysql
restart: always
ports:
- 3306:3306
should be
# Database
db:
image: linuxserver/mariadb
volumes:
- db_data:/var/lib/mysql
restart: always
ports:
- 3306:3306
Try another image. I have a lot trouble using linuxserver image after few update. mariadb have official image on docker. Or maybe if you are want to still use linuxserver image, try another mariadb image version.

Docker nginx responds 403 if you are offline

Im running docker with nginx, PHP and MariaDb in my company.
But if my laptop is offline or Im connected with vpn the nginx responds with an 403 error. Docker is starting normally. Do you have any idea why I get the 403 from nginx?
Maybe Its because of the mounted drives?
2018/06/05 13:23:20 [error] 5#5: *3 directory index of "/var/www/html/" is
forbidden, client: 172.21.0.1, server: _, request: "GET / HTTP/1.1", host:
"localhost"
172.21.0.1 - - [05/Jun/2018:13:23:20 +0000] "GET / HTTP/1.1" 403 572 "-"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/66.0.3359.139 Safari/537.36" "-"
Edit: I figured out that I cant mount the shared drives. I got an error that the firewall blocks it.

503 Service Temporarily Unavailable nginx/1.13.3 in docker

I am trying to use jwilder/nginx-proxy: alpine in order to start nginx, following is the docker run command and steps:
Step1: docker run -d -p 80:80 -p 443:443 -v /var/run/docker.sock:/tmp/docker.sock:ro --name nginx jwilder/nginx-proxy:alpine
Step2: Opened port 80 in the Security Group of ec2 instance, and trying to connect to ip:80/, but the error is as follows 503 Service Temporarily Unavailable nginx/1.13.3
docker logs says:
WARNING: /etc/nginx/dhparam/dhparam.pem was not found. A pre-generated dhparam.pem will be used for now while a new one
is being generated in the background. Once the new dhparam.pem is in place, nginx will be reloaded.
forego | starting dockergen.1 on port 5000
Generating DH parameters, 2048 bit long safe prime, generator 2
forego | starting nginx.1 on port 5100
dockergen.1 | 2017/08/14 13:45:44 Generated '/etc/nginx/conf.d/default.conf' from 4 containers
dockergen.1 | 2017/08/14 13:45:44 Running 'nginx -s reload'
dockergen.1 | 2017/08/14 13:45:44 Watching docker events
dockergen.1 | 2017/08/14 13:45:44 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx.1 | ec2-xx.xx.xxx.xx..ap-xyz-5.compute.amazonaws.com xx.xxx.xxx.x - "GET / HTTP/1.1" 503 615 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
nginx.1 | ec2-xx.xxx.xxxx.xxx.ap-xyz-5.compute.amazonaws.com xx.xx.xx.xxx "GET /favicon.ico HTTP/1.1" 503 615 "http://ec2-xx.xxx.xx.xx.ap-xyz-5.compute.amazonaws.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
jwilder/nginx-proxy doesn't make a lot of sense ran alone. The script behind the magic check other containers environment variables and generate the according rules to reverse proxy from hostname from another container as defined in env var : port defined the same way to the said container & port.
The key here is "hostname from another container". Nginx won't proxy-forward you when you're trying to connect with an IP like you said.
Here's an example from jwielder/nginx's README.md from its github repository
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
whoami:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=whoami.local <================
Run this, edit your hosts file (something like sudo vim /etc/hosts) add [ec2ip] whoami.local then open your browser for http://whoami.local, that'll work just fine.

Docker: Output shown at http://192.168.99.100:8000/ instead of http://0.0.0.0:8000/

Hi just fount out that the "hello world" is printed out at http://192.168.99.100:8000/ not http://0.0.0.0:8000/ or local:8000.
Although the it's listening at: http://0.0.0.0:8000 (1) . I'm wondering why this is happening. Does anyone know how to fix this? Thanks!
Terminal output:
[2016-09-19 03:56:50 +0000] [1] [INFO] Starting gunicorn 19.4.5
[2016-09-19 03:56:50 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2016-09-19 03:56:50 +0000] [1] [INFO] Using worker: sync
[2016-09-19 03:56:50 +0000] [9] [INFO] Booting worker with pid: 9
192.168.99.1 - - [19/Sep/2016:04:08:25 +0000] "GET / HTTP/1.1" 200 12 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.9.5 Chrome/45.0.2454.85 Electron/0.35.4 Safari/537.36"
192.168.99.1 - - [19/Sep/2016:04:08:30 +0000] "GET / HTTP/1.1" 200 12 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.9.5 Chrome/45.0.2454.85 Electron/0.35.4 Safari/537.36"
192.168.99.1 - - [19/Sep/2016:04:08:39 +0000] "GET / HTTP/1.1" 200 12 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.9.5 Chrome/45.0.2454.85 Electron/0.35.4 Safari/537.36"
192.168.99.1 - - [19/Sep/2016:04:08:43 +0000] "GET / HTTP/1.1" 200 12 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.9.5 Chrome/45.0.2454.85 Electron/0.35.4 Safari/537.36"
[2016-09-19 04:09:14 +0000] [1] [INFO] Starting gunicorn 19.4.5
[2016-09-19 04:09:14 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2016-09-19 04:09:14 +0000] [1] [INFO] Using worker: sync
[2016-09-19 04:09:14 +0000] [9] [INFO] Booting worker with pid: 9
192.168.99.1 - - [19/Sep/2016:04:09:30 +0000] "GET / HTTP/1.1" 200 12 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.27 Safari/537.36"
192.168.99.1 - - [19/Sep/2016:04:09:31 +0000] "GET /favicon.ico HTTP/1.1" 404 233 "http://192.168.99.100:8000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.27 Safari/537.36"
[2016-09-19 04:10:27 +0000] [1] [INFO] Starting gunicorn 19.4.5
[2016-09-19 04:10:27 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2016-09-19 04:10:27 +0000] [1] [INFO] Using worker: sync
[2016-09-19 04:10:27 +0000] [9] [INFO] Booting worker with pid: 9
[2016-09-19 04:13:47 +0000] [1] [INFO] Starting gunicorn 19.4.5
[2016-09-19 04:13:47 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2016-09-19 04:13:47 +0000] [1] [INFO] Using worker: sync
[2016-09-19 04:13:47 +0000] [9] [INFO] Booting worker with pid: 9
192.168.99.1 - - [19/Sep/2016:04:13:52 +0000] "GET / HTTP/1.1" 200 12 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.27 Safari/537.36"
You appear to be using docker-machine, given the IP your ports are exposed to, which means that all the docker-ports are exposed on the results of docker-machine ip. This is because all the containers are running inside of a virtual machine that docker-machine uses (probably in VirtualBox as a VM provider).
If you want to expose this port to 0.0.0.0 or localhost you need make sure you are forwarding the ports in your VirtualBox VM for whatever your docker-machine is. This requires adding the ports under the VM network settings.

Resources