diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..aaa67de --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM osrf/ros:noetic-desktop-full + +COPY ./entrypoint.sh ./ +RUN chmod +x ./entrypoint.sh + +ENTRYPOINT ["./entrypoint.sh"] +CMD ["bash"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..4f08fab --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,18 @@ + +services: + ros-master: + image: ros-noetic-master + container_name: ros-noetic-master + build: + context: . + dockerfile: Dockerfile + stdin_open: true + tty: true + network_mode: "host" + # command: bash -c "source /opt/ros/noetic/setup.bash && roscore" + environment: + - DISPLAY=:0 + - LIBGL_ALWAYS_SOFTWARE=1 + - QT_X11_NO_MITSHM=1 + volumes: + - "/tmp/.X11-unix:/tmp/.X11-unix:rw" diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..768456c --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +# setup ros2 environment +source "/opt/ros/noetic/setup.bash" -- +exec "$@" \ No newline at end of file