Skip to content

Commit 35f81ec

Browse files
author
abarbie
committed
dockerfile tag fixes
1 parent 6080ba4 commit 35f81ec

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

.github/workflows/build-arm64v8.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: self-hosted
7+
runs-on: [self-hosted, Linux, ARM&$]
88

99
steps:
1010
- uses: actions/checkout@v2

PiCar-X/docker-compose-dtp.yml

+19-8
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
services:
22
picarx-ds:
3-
build: .
43
image: abarbie/picarx:${TAG}
54
environment:
65
- ROS_HOSTNAME=picarx-ds
6+
- ROS_MASTER_URI=http://picarx-ds:11311
7+
- ROS_HOST_PORT=11311
78
tty: true
89
ports:
910
- 11311:11311
1011
command: roscore
11-
depends_on:
12-
picarx-ds:
13-
condition: service_healthy
12+
healthcheck:
13+
test: [ "CMD-SHELL", "curl $${ROS_MASTER_URI} || exit 1" ]
14+
interval: 5s
15+
timeout: 1s
16+
retries: 5
17+
start_period: 1s
1418

1519
picarx-gazebo:
1620
build:
1721
context: ./simulation
1822
dockerfile: Dockerfile
1923
target: desktop
24+
args:
25+
- TAG=${TAG}
2026
image: abarbie/picarx/picarx-gazebo:${TAG}
2127
env_file:
2228
- ./core/dtp/env/simulation.env
2329
environment:
2430
- DISPLAY=host.docker.internal:0.0
2531
- LIBGL_ALWAYS_INDIRECT=0
2632
- ROS_HOSTNAME=picarx-gazebo
33+
- ROS_MASTER_URI=http://picarx-gazebo:11312
2734
tty: true
2835
ports:
2936
- 11312:11312
@@ -64,8 +71,12 @@ services:
6471
condition: service_healthy
6572

6673
motor_left-dtp:
67-
build: ./ros/drivers/dcmotor
6874
image: abarbie/picarx/drivers/dcmotor:${TAG}
75+
build:
76+
dockerfile: Dockerfile
77+
context: ./ros/drivers/dcmotor/
78+
args:
79+
- TAG=${TAG}
6980
env_file:
7081
- ./core/dtp/env/picarx.env
7182
tty: true
@@ -157,7 +168,7 @@ services:
157168
- ./ros/emulators/dcmotor:/root/catkin_ws/src/emulators/dcmotor
158169
command: /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_left.launch"
159170
depends_on:
160-
picarx-ds:
171+
picarx-gazebo:
161172
condition: service_healthy
162173

163174
motor_emulator_right-dtp:
@@ -174,7 +185,7 @@ services:
174185
command: /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_right.launch"
175186

176187
depends_on:
177-
picarx-ds:
188+
picarx-gazebo:
178189
condition: service_healthy
179190

180191
steering_emulator-dtp:
@@ -195,7 +206,7 @@ services:
195206
- ./ros/emulators/clutchgear:/root/catkin_ws/src/emulators/clutchgear
196207
command: /bin/bash -c "roslaunch picarx_clutchgear_emulator ackermann_clutchgear_emulator.launch"
197208
depends_on:
198-
picarx-ds:
209+
picarx-gazebo:
199210
condition: service_healthy
200211

201212
networks:

PiCar-X/simulation/Dockerfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
ARG TAG=latest
2-
31
FROM osrf/ros:noetic-desktop-full as gazebo-full
4-
2+
ARG TAG
53
WORKDIR /root/catkin_ws
6-
74
RUN apt-get update \
85
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools \
96
&& apt-get clean \
107
&& update-ca-certificates -f
118

129
FROM gazebo:libgazebo11 as gazebo-only
13-
10+
ARG TAG
1411
WORKDIR /root/catkin_ws
15-
1612
RUN apt-get update \
1713
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools \
1814
&& apt-get clean \
1915
&& update-ca-certificates -f
2016

21-
17+
ARG TAG=latest
2218

2319
FROM gazebo-full as desktop
20+
ARG TAG
2421
COPY --from=abarbie/picarx:${TAG} /root/catkin_ws/ .
2522
COPY ./simulation ./src/simulation
2623

@@ -30,6 +27,8 @@ RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin config --isolate-d
3027

3128
ENTRYPOINT [ "/root/catkin_ws/src/arches/arches_core/ENTRYPOINT.sh" ]
3229

30+
31+
ARG TAG=latest
3332
FROM gazebo-only as tests
3433
COPY --from=abarbie/picarx:${TAG} /root/catkin_ws/ .
3534
COPY ./simulation ./src/simulation

0 commit comments

Comments
 (0)