Skip to content

Commit 4bc0f5d

Browse files
committed
feat : Add docker CI
1 parent d209fcc commit 4bc0f5d

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

.github/workflows/docker-CI.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docker-CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_run:
8+
workflows: ["Build-CI"]
9+
types:
10+
- completed
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Log in to GitHub Container Registry
18+
uses: docker/login-action@v2
19+
with:
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Build Docker image
25+
run: |
26+
docker build -t ghcr.io/irobot-algorithm/sentry_navigation:latest .
27+
28+
- name: Push Docker image
29+
run: |
30+
docker push ghcr.io/irobot-algorithm/sentry_navigation:latest

Dockerfile

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM ghcr.io/irobot-algorithm/sentry_navigation/environment:latest
2+
LABEL org.opencontainers.image.source=https://github.com/IRobot-Algorithm/sentry_navigation
23

34
# Create workspace
45
RUN mkdir -p /home/nav_ws
@@ -9,35 +10,6 @@ ADD src /home/nav_ws/src
910
ADD thirdparty /home/nav_ws/thirdparty
1011
ADD build.sh /home/nav_ws
1112

12-
# Install dependencies
13-
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
14-
RUN echo "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" > /etc/apt/sources.list.d/realsense.list
15-
RUN apt-get update && \
16-
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake libeigen3-dev libpcl-dev libgoogle-glog-dev libudev-dev git libxrandr-dev libxi-dev libxinerama-dev libsdl2-dev libusb-1.0.0-dev && \
17-
cp -rf /usr/include/eigen3/Eigen /usr/include/Eigen -R
18-
19-
# Install thirdparty dependencies
20-
RUN for file in /home/nav_ws/thirdparty/*; do \
21-
if [ -f "$file" ]; then \
22-
case "$file" in \
23-
*.tar.gz) tar -xzf "$file" -C /home/nav_ws/thirdparty ;; \
24-
*.zip) unzip "$file" -d /home/nav_ws/thirdparty ;; \
25-
*.tar.bz2) tar -xjf "$file" -C /home/nav_ws/thirdparty ;; \
26-
*.tar.xz) tar -xJf "$file" -C /home/nav_ws/thirdparty ;; \
27-
esac; \
28-
rm "$file"; \
29-
fi; \
30-
done
31-
RUN find /home/nav_ws/thirdparty -name "install.sh" -type f -exec bash -c 'cd "$(dirname "{}")" && chmod 777 install.sh && ./install.sh' \;
32-
33-
# # Install ROS dependencies
34-
RUN apt-get install -y ros-noetic-rviz ros-noetic-cv-bridge ros-noetic-pcl-ros \
35-
ros-noetic-tf-conversions ros-noetic-eigen-conversions \
36-
ros-noetic-ddynamic-reconfigure ros-noetic-diagnostic-updater \
37-
ros-noetic-image-geometry ros-noetic-costmap-2d \
38-
ros-noetic-nav-core ros-noetic-navfn
39-
40-
4113
# Build the workspace
4214
RUN chmod 777 build.sh && \
4315
./build.sh

0 commit comments

Comments
 (0)