Debian Codegraph @

host/misc/docker/ubuntu-latest-i386.Dockerfile

raw
1 # This file is part of the bladeRF project:
2 # http://www.github.com/nuand/bladeRF
3 #
4 # Copyright (c) 2025 Nuand LLC.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 # THE SOFTWARE.
23
24 FROM i386/ubuntu:latest
25
26 LABEL maintainer="Nuand LLC <[email protected]>"
27 LABEL version="0.0.2"
28 LABEL description="CI build environment for the bladeRF project"
29 LABEL com.nuand.ci.distribution.name="Ubuntu"
30 LABEL com.nuand.ci.distribution.codename="latest"
31 LABEL com.nuand.ci.distribution.version="latest-i386"
32
33 # Install things
34 RUN apt-get update \
35 && apt-get install -y \
36 build-essential \
37 clang \
38 doxygen \
39 git \
40 help2man \
41 libcurl4-openssl-dev \
42 libedit-dev \
43 libncurses5-dev \
44 libncurses-dev \
45 libncursesw5-dev \
46 libssl-dev \
47 libusb-1.0-0-dev \
48 pandoc \
49 pkg-config \
50 usbutils \
51 wget \
52 && apt-get clean
53
54 # Custom compile cmake because the version provided in the i386 repos is too old for our cmake scripts
55 RUN version=3.28 \
56 && build=1 \
57 && mkdir ~/temp \
58 && cd ~/temp \
59 && wget -nv https://cmake.org/files/v$version/cmake-$version.$build.tar.gz \
60 && tar -xzf cmake-$version.$build.tar.gz \
61 && cd cmake-$version.$build/ \
62 && ./bootstrap --parallel=$(nproc) --no-debugger \
63 && make -j$(nproc) \
64 && make install
65
66 # Copy in our build context
67 COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF
68 COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config
69 WORKDIR /root/bladeRF
70
71 # Build arguments
72 ARG compiler=gcc
73 ARG buildtype=Release
74 ARG taggedrelease=NO
75 ARG parallel=1
76
77 RUN ${compiler} --version
78
79 # Do the build!
80 RUN cd /root/bladeRF/ \
81 && mkdir -p build \
82 && cd build \
83 && cmake \
84 -DBUILD_DOCUMENTATION=ON \
85 -DCMAKE_C_COMPILER=${compiler} \
86 -DCMAKE_BUILD_TYPE=${buildtype} \
87 -DENABLE_FX3_BUILD=OFF \
88 -DENABLE_HOST_BUILD=ON \
89 -DTAGGED_RELEASE=${taggedrelease} \
90 ../ \
91 && make -j${parallel} \
92 && make install \
93 && ldconfig
94
95 # Do an i686 build
96 RUN cd /root/bladeRF/ \
97 && rm -rf build \
98 && mkdir -p build \
99 && cd build \
100 && cmake \
101 -DBUILD_DOCUMENTATION=ON \
102 -DCMAKE_C_COMPILER=${compiler} \
103 -DCMAKE_BUILD_TYPE=${buildtype} \
104 -DCMAKE_C_FLAGS="-march=i686 -mtune=i686" \
105 -DCMAKE_CXX_FLAGS="-march=i686 -mtune=i686" \
106 -DENABLE_FX3_BUILD=OFF \
107 -DENABLE_HOST_BUILD=ON \
108 -DTAGGED_RELEASE=${taggedrelease} \
109 ../ \
110 && make -j${parallel} \
111 && make install \
112 && ldconfig