Cannot login with wp-cli generated user wordpress behind reverse proxy
<p>Hello fellows I have made a custom wordpress image located there: <a href="https://github.com/ellakcy/wordpressWithPlugins" rel="nofollow noreferrer">https://github.com/ellakcy/wordpressWithPlugins</a></p>
<p>And on entrypoint script I am using wp-cli in order to generate a custom user in order to preinstall plugins. But I cannot login to the control panel with the generated user from wp-cli.</p>
<p>Do you have any Idea how to fix it?</p>
<p>The entrypoint of the script is the following: <a href="https://github.com/ellakcy/wordpressWithPlugins/blob/master/docker-entrypoint.sh" rel="nofollow noreferrer">https://github.com/ellakcy/wordpressWithPlugins/blob/master/docker-entrypoint.sh</a></p>
<p>I run the containers with these commands: (for development purpose)</p>
<blockquote>
<p>docker run --name wpdb  -e MYSQL_ROOT_PASSWORD=1234 -d mariadb
docker run --name mywordpress --link wpdb:mysql -p 8080:80 -ti wp</p>
</blockquote>
<p>And I am using apache as reverse proxy in order to access the wordpress running in the mywordpress container:</p>
<pre><code>&lt;VirtualHost *:80&gt;

ProxyPass /  http://172.17.0.3/
ProxyPassReverse  http://172.17.0.3/ /

&lt;/Virtualhost&gt;
</code></pre>
<p>(In place of 172.17.0.3 can be the ip of the container running the wordpress)</p>
<h3>Edit 1</h3>
<p>I managed to login by setting up a network:</p>
<blockquote>
<p>docker network create --subnet=&quot;172.19.0.0/16&quot; wordpress_default</p>
</blockquote>
<p>And setting the custom ips to the coontainers. (Also I set some Enviromental variables too.)</p>
<blockquote>
<h1>RUN MYSQL/MARIADB</h1>
<p>docker run --name wpdb --net wordpress_default --ip 172.19.0.2 -e MYSQL_ROOT_PASSWORD=1234 -d mariadb</p>
<h1>run wordpress docker with some extra enviiromental variables</h1>
<p>docker run --name mywordpress --net wordpress_default --ip 172.19.0.3 --link wpdb:mysql -e WORDPRESS_ADMIN_PASSWORD=1234 -e WORDPRESS_ADMIN_EMAIL=pc_magas@openmailbox.org -e WORDPRESS_URL=172.19.0.3 -p 8080:80 -ti wp</p>
</blockquote>
<p>And visiting the wordpress site via the ip given oon the second coommand. But I still have problems with the local apache running as reverse proxy.</p>