4
620hun
7y

I wish Docker had docs explaining how to migrate EXISTING projects. The pros better outweigh the cons after all this time...

Comments
  • 0
    What's the problem? Maybe I can help.
  • 1
    @tracktraps I think I got it, but I might get back at you. Cheers!
  • 0
    @tracktraps Hey, I hit a wall with something else, maybe you can help. How do I make my containers talk to each other in swarm mode. They are on the same network, I made sure, I just don't know how to achieve the "links" equivalent of swarm. I have a nginx container that's exposed on 80, and that should fowrard requests to 8001 of my web container. But that doesn't happen.
  • 0
    @620hun Just a example of how I do it (apache + adminer + mysql):

    !#/bash

    sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080

    docker run --name mysqlserver -t -i -p 3306:3306 -d -e MYSQL_ROOT_PASSWORD=rootpass -v ~/.config/MySQL/my.cnf:/etc/my.cnf -v /mnt/databases/mysql:/var/lib/mysql mysql/mysql-server

    docker run --name adminer -d --link mysqlserver:mysql -e PMA_HOST=172.17.0.2 -p 8095:80 clue/adminer

    docker run --name apache --link mysqlserver:mysql -t -i -d -p 8080:80 -e XDEBUG_ENABLE=1 -e xdebug.remote_enable=1 -e xdebug.remote_connect_back=1 /mnt/projects/xxx/:/var/www webserver:apache
  • 0
    @tracktraps Turns out that it was a nginx:alpine issue. It works fine with the regular image 🙄 but cheers!
Add Comment