-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5518e05
commit 6832490
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build and push multi-arch ubuntu-3588-rootfs Docker image | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'ubuntu-3588-rootfs/Dockerfile_ROS2' | ||
pull_request: | ||
paths: | ||
- 'ubuntu-3588-rootfs/Dockerfile_ROS2' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Copy files | ||
run: | | ||
cp ubuntu-3588-rootfs/kaylor-keyring.gpg ./ | ||
cp ubuntu-3588-rootfs/rk3588-kaylor.list ./ | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ubuntu-3588-rootfs/Dockerfile_ROS2 | ||
push: true | ||
tags: kaylor/ubuntu-3588-rootfs:humble-ros-base-jammy | ||
platforms: linux/arm64 | ||
|
||
- name: Logout of DockerHub | ||
run: docker logout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Version 1.0 | ||
FROM ros:humble-ros-base-jammy | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Asia/Shanghai | ||
# 维护者 | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN sed -i "s/ports.ubuntu.com/mirrors.cloud.tencent.com/g" /etc/apt/sources.list | ||
|
||
COPY kaylor-keyring.gpg /etc/apt/keyrings/ | ||
COPY rk3588-kaylor.list /etc/apt/sources.list.d/ | ||
|
||
RUN apt update && apt install -y --no-install-recommends gcc g++ cmake openssh-server && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | ||
echo "PermitRootLogin yes" | tee -a /etc/ssh/sshd_config | ||
|
||
RUN echo 'root:root' | chpasswd | ||
|
||
RUN apt update && apt install -y --no-install-recommends vim libopencv-dev g++ gcc \ | ||
fakeroot devscripts libspdlog-dev libsystemd-dev libcap-dev liblz4-dev \ | ||
libgcrypt-dev libzstd-dev debhelper rknpu2-dev librockchip-mpp-dev librga-dev \ | ||
libstb-dev libturbojpeg0-dev libjpeg-turbo8-dev librga2 libboost-dev \ | ||
libboost-system1.74-dev kaylordut-dev libbytetrack && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# 设置当容器启动时自动运行 SSH 服务 | ||
# 使用 init 脚本启动 SSH 服务 | ||
CMD ["/etc/init.d/ssh", "start"] | ||
|
||
# 因为 `ssh start` 命令会执行完毕后退出,我们需要一个持续运行的前台进程 | ||
# 可以通过让 bash 在前台无限运行来做到这一点 | ||
CMD ["bash", "-c", "service ssh start; while true; do sleep 30; done;"] |