File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM fedora:41
2
+
3
+ RUN dnf install -y gcc gcc-c++ cmake ninja-build rpm-build opencv-devel SDL2-devel SDL2_mixer-devel
4
+
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:24.04
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y \
5
+ build-essential cmake g++ wget unzip ninja-build \
6
+ libsdl2-dev libsdl2-mixer-dev \
7
+ libopencv-dev \
8
+ libgl1-mesa-dev
9
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ IMAGE=" vision-rc"
4
+ APP_DIR=$( dirname " $0 " )
5
+ EXEC_CMD=" docker exec --user $UID "
6
+
7
+ for distro in ubuntu fedora; do
8
+ # Make sure there's not any images with our build image names yet
9
+ docker rmi ${IMAGE} :${distro}
10
+ # Build the image
11
+ docker build -t ${IMAGE} :${distro} -f Containerfile.${distro} .
12
+ # Start a container with the built image
13
+ docker run -dt -v ${APP_DIR} :/app --name vision-rc-ubuntu ${IMAGE} :${distro} cat
14
+
15
+ # Configure, build, and package
16
+ ${EXEC_CMD} vision-rc-${distro} cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCPACK_SYSTEM_NAME=${distro} -B build -S app
17
+ ${EXEC_CMD} vision-rc-${distro} cmake --build build --target all
18
+ ${EXEC_CMD} vision-rc-${distro} cmake --build build --target package
19
+ ${EXEC_CMD} vision-rc-${distro} cmake --build build --target package_source
20
+ ${EXEC_CMD} vision-rc-${distro} mv /build/* .deb /build/* .rpm /build/* .tar.gz /app
21
+
22
+ # Stop the container and clean up
23
+ docker stop vision-rc-${distro}
24
+ docker rm vision-rc-${distro}
25
+ done
26
+
You can’t perform that action at this time.
0 commit comments