Docker Community Forums

Share and learn in the Docker community.

Debugging 502 bad Gateway in Docker


#1

hi. i am new to docker. i keep getting a 502 Bad gateway when i try to access the ip address of my container.

i would ask for help in trying to debug what is causing this problem

i installed this : image.

i then did a docker-compose up -d

it returned:

Starting testmagento_dbdata_1 … done
Starting testmagento_appdata_1 … done
Starting testmagento_db_1 … done
Starting testmagento_cron_1 … done
Starting testmagento_fpm_1 … done
Starting testmagento_cli_1 … done
Starting testmagento_web_1 … done
Starting testmagento_varnish_1 … done

i then did a docker ps to get the ip address;
it returned:

c36ae7622ed3        meanbee/magento2-varnish:latest   "/bin/sh -c /start.sh"   15 hours ago        Up 11 seconds       0.0.0.0:32803->80/tcp                     testmagento_varnish_1
6c725f62308c        meanbee/magento2-nginx:1.9        "/usr/local/bin/dock…"   15 hours ago        Up 12 seconds       443/tcp, 0.0.0.0:32802->80/tcp            testmagento_web_1

i then tried to access a page at

http://localhost:32802

this returned a 502 Bad Gateway . nginx/1.9.15