How to set a specfic ip address with docker-compose who's accessible
<p>currently I playaround with Docker and I liked it, but how can I set a IP-Address with docker-compose ?  </p>

<p>Here's my problem, on the docker-compose website is  a quickstart example with Wordpress.</p>

<pre><code>version: '2'
services:
  db:
    image: mysql:5.7
    volumes:
   - "./.data/db:/var/lib/mysql"
 restart: always
 environment:
   MYSQL_ROOT_PASSWORD: wordpress
   MYSQL_DATABASE: wordpress
   MYSQL_USER: wordpress
   MYSQL_PASSWORD: wordpress

 wordpress:
   depends_on:
     - db
   image: wordpress:latest
   links:
     - db
   ports:
     - "8000:80"
   restart: always
   environment:
     WORDPRESS_DB_HOST: db:3306
     WORDPRESS_DB_PASSWORD: wordpress
</code></pre>

<p>And now I want that the Wordress-Site is available under the IP-Address 10.10.10.25, how can I do it ?</p>

<p>It's possible with Docker-compose ? </p>

<p><strong>Edit</strong></p>

<p>So I try to build my network, but it does not work.</p>

<pre><code> version: '2'
    services:
      db:
        image: mysql:5.7
        volumes:
          - "./.data/db:/var/lib/mysql"
        restart: always
        environment:
          MYSQL_ROOT_PASSWORD: wordpress
          MYSQL_DATABASE: wordpress
          MYSQL_USER: wordpress
          MYSQL_PASSWORD: wordpress
        networks:
          mynet:
            ipv4_address: 172.25.0.102
      wordpress:
        depends_on:
          - db
        image: wordpress:latest
        links:
          - db
        ports:
          - "8000:80"
        restart: always
        environment:
          WORDPRESS_DB_HOST: db:3306
          WORDPRESS_DB_PASSWORD: wordpress
        networks:
          mynet:
            ipv4_address: 172.25.0.101
    networks:
      mynet:
        driver: bridge
        ipam:
          config:


 subnet: 172.25.0.0/24
</code></pre>

<p>It got only the following error message.</p>

<blockquote>
  <p>wordpress_1  | Warning: mysqli::mysqli(): (HY000/2002): Connection
  refused in - on line 19 wordpress_1  |  wordpress_1  | MySQL
  Connection Error: (2002) Connection refused wordpress_1  | AH00558:
  apache2: Could not reliably determine the server's fully qualified
  domain name, using 172.25.0.101. Set the 'ServerName' directive
  globally to suppress this message wordpress_1  | AH00558: apache2:
  Could not reliably determine the server's fully qualified domain name,
  using 172.25.0.101. Set the 'ServerName' directive globally to
  suppress</p>
</blockquote>