diff --git a/README.md b/README.md index 602fc60..6154cff 100644 --- a/README.md +++ b/README.md @@ -210,10 +210,10 @@ angular: ## Development Check how to [install the driver from source](#installing-from-source), -or use the [`Dockerfile`](Dockerfile) to get setup a reproducible dev environment: +or use `docker compose` to get a more reproducible dev environment: ```sh -docker build -t ros2-naoqi-driver . +ROS_DISTRO=iron docker compose up dev --build ``` > To get all logs in live and build debuggable binaries, diff --git a/docker-compose.yaml b/docker-compose.yaml index 91424c4..8413f62 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,32 +1,30 @@ -# Docker Compose file for TurtleBot3 Behavior Examples +# Docker Compose file for developer containers # # Usage: # -# To build the images: -# docker compose build -# -# To start up a specific service by name: -# docker compose up +# ROS_DISTRO= docker compose up dev --build # # To open an interactive shell to a running container: -# docker exec -it bash +# docker exec -it naoqi_driver-dev-1 bash version: "3.9" services: - # Developer container dev: - image: ros2-naoqi-driver:dev + image: naoqi-driver:dev-$ROS_DISTRO build: context: . dockerfile: docker/Dockerfile target: dev + args: + - ROS_DISTRO=$ROS_DISTRO # Interactive shell stdin_open: true tty: true + # Networking and IPC for ROS 2 network_mode: host ipc: host volumes: # Mount the source code - - .:/ws/src/naoqi_driver2:rw + - .:/ws/src/naoqi_driver:rw diff --git a/docker/Dockerfile b/docker/Dockerfile index 65b0107..1fdb6c9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,7 +6,7 @@ SHELL ["/bin/bash", "-c"] # Create Colcon workspace with the project and its deps ENV WS=/ws -ENV PROJ_SRC=${WS}/src/naoqi_driver2 +ENV PROJ_SRC=${WS}/src/naoqi_driver COPY . $PROJ_SRC WORKDIR $WS/src RUN apt install -y git python3-vcstool