Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new networking method for docker-compose #2

Open
Roboticom314 opened this issue Jul 29, 2016 · 3 comments
Open

new networking method for docker-compose #2

Roboticom314 opened this issue Jul 29, 2016 · 3 comments

Comments

@Roboticom314
Copy link

In the README.md for the multicontainer version, an example is given using docker-compose. The first command ($ docker-compose --x-networking up -d ) doesn't seem to work with recent versions of docker. I'm using docker-compose version 1.8.0 on ubuntu 14.04.4.

It may be that the --x-networking option has been deprecated in favor of the new version 2 compose file format.

@ruffsl
Copy link
Owner

ruffsl commented Jul 29, 2016

Indeed it has. I've updated the docs on the official Docker Hub repo for ROS, but have somewhat neglected my own demo examples. If there is anything else that has become deprecated, please let me know so that when I get the time I can refresh this repo in one go.

@Roboticom314
Copy link
Author

Will do. It's a great starting point though.

It might be nice to add a demo here for using custom ROS package install output (from catkin_make install) in a custom docker image. Reference to setting up a private registry would be handy too. I think after that information, one could confidently create and distribute custom ROS packages in docker images.

@huamichaelchen
Copy link

huamichaelchen commented Dec 2, 2018

First of all, great tutorial !!! Learned so much :)
And just help others, here the version 2 docker-compose yml file that worked like a charm :)

version: "2"

services:
  master:
    build: .
    container_name: master
    command:
      - roscore

  talker:
    build: .
    container_name: talker
    environment:
      - "ROS_HOSTNAME=talker"
      - "ROS_MASTER_URI=http://master:11311"
    command: rosrun roscpp_tutorials talker

  listener:
    build: .
    container_name: listener
    environment:
      - "ROS_HOSTNAME=listener"
      - "ROS_MASTER_URI=http://master:11311"
    command: rosrun roscpp_tutorials listener

And here is my docker CE version
Docker version 18.09.0, build 4d60db4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants