This happened after WP was installed without SSL and then after some days, SSL was added. It only happened when trying to access /wp-admin/ route.
Adding the following lines of code at the after “/* Add any custom values between this line and the “stop editing” line. */” line of wp-config.php:
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
In the proxy settings for nginx add these directives:
... location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://your-wordpress-docker-upstream$request_uri; } ...
Install php-gd package. On Debian Wheezy:
apt-get install php5-gd
service apache2 restart