File tree Expand file tree Collapse file tree 6 files changed +51
-6
lines changed Expand file tree Collapse file tree 6 files changed +51
-6
lines changed Original file line number Diff line number Diff line change 32
32
context : .
33
33
platforms : linux/amd64,linux/arm64
34
34
push : true
35
- build-args : |
36
- ROS_DISTRO=humble
37
- tags : ghcr.io/rosblox/${{ github.event.repository.name }}:humble
35
+ tags : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:humble
Original file line number Diff line number Diff line change 1
- ARG ROS_DISTRO
1
+ ARG ROS_DISTRO=humble
2
2
3
3
FROM ros:${ROS_DISTRO}-ros-core
4
4
5
5
RUN apt-get update && apt-get install -y --no-install-recommends \
6
6
ros-${ROS_DISTRO}-joy-linux \
7
- && rm -rf /var/lib/apt/lists/*
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ COPY ros_entrypoint.sh .
10
+
11
+ ENV LAUNCH_COMMAND='ros2 run joy_linux joy_linux_node'
12
+
13
+ RUN echo 'alias run="su - ros --whitelist-environment=\" ROS_DOMAIN_ID\" /run.sh"' >> /etc/bash.bashrc && \
14
+ echo "source /opt/ros/$ROS_DISTRO/setup.bash; echo UID: $UID; echo ROS_DOMAIN_ID: $ROS_DOMAIN_ID; $LAUNCH_COMMAND" >> /run.sh && chmod +x /run.sh
Original file line number Diff line number Diff line change 1
- docker build -t ghcr.io/rosblox/ros-joy-linux:humble .
1
+ #! /bin/bash
2
+
3
+ export BUILDKIT_PROGRESS=plain
4
+
5
+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
6
+
7
+ docker compose -f $SCRIPT_DIR /docker-compose.yml build docker build -t ghcr.io/rosblox/ros-joy-linux:humble .
Original file line number Diff line number Diff line change
1
+ services :
2
+ ros-joy-linux :
3
+ image : ghcr.io/rosblox/ros-joy-linux:humble
4
+ build :
5
+ context : .
6
+ dockerfile : Dockerfile
7
+ restart : always
8
+ network_mode : " host"
9
+ ipc : host
10
+ pid : host
11
+ volumes :
12
+ - /dev/input:/dev/input
13
+ environment :
14
+ - UID=${HOST_UID}
15
+ - ROS_DOMAIN_ID
16
+ command : su - ros --whitelist-environment=ROS_DOMAIN_ID /run.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ id -u ros & > /dev/null || adduser --quiet --disabled-password --gecos ' ' --uid ${UID:= 1000} ros
5
+
6
+ source /opt/ros/${ROS_DISTRO} /setup.bash
7
+
8
+ exec " $@ "
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ REPOSITORY_NAME=" $( basename " $( dirname -- " $( readlink -f -- " $0 " ; ) " ) " ) "
4
+
5
+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
6
+
7
+ export HOST_UID=$( id -u)
8
+
9
+ docker compose -f $SCRIPT_DIR /docker-compose.yml run \
10
+ ${REPOSITORY_NAME} bash
You can’t perform that action at this time.
0 commit comments