Allow for image folder to be passed to container

This commit is contained in:
2023-03-31 14:09:08 +03:00
parent fde362b526
commit 93e5707ca9
2 changed files with 10 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ RUN source "/opt/ros/${ROS_DISTRO}/setup.bash" && \
rm -rf ${WS_LOG_DIR} rm -rf ${WS_LOG_DIR}
# Copy example svg images # Copy example svg images
COPY ./svg svg COPY ./svg test-images
### Add workspace to the ROS entrypoint ### Add workspace to the ROS entrypoint
### Source ROS workspace inside `~/.bashrc` to enable autocompletion ### Source ROS workspace inside `~/.bashrc` to enable autocompletion

View File

@@ -34,13 +34,21 @@ If active changes are being made, run:
bash .docker/devel.bash bash .docker/devel.bash
``` ```
This will mount the host `drawing-robot-ros2` directory in the container at `src/drawing-robot-ros2`. This will mount the host `drawing-robot-ros2` directory in the container at `src/drawing-robot-ros2`.
If using podman instead of docker using the following will allow the container to access `/dev/` which is needed by the axidraw robot.
Optionally you can pass a directory to the container with
``` sh
bash .docker/run.bash -v PATH_TO_SVG:/ws/PATH_IN_CONTAINER:ro
```
#### Podman issues
If using podman instead of docker, using the following will allow the container to access `/dev/` which is needed by the axidraw robot.
``` sh ``` sh
sudo bash .docker/build.bash sudo bash .docker/build.bash
``` ```
``` sh ``` sh
sudo bash .docker/devel.bash sudo bash .docker/devel.bash
``` ```
Adding sudo may cause gazebo not to work, so it is recommended to use docker instead of podman.
## TODO Building locally ## TODO Building locally