-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.uclibc
30 lines (23 loc) · 1023 Bytes
/
Dockerfile.uclibc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM navrocky/buildroot-uclibc-toolchain:i686-2023.11.1
RUN set -x && \
apt-get update && \
apt-get -y --no-install-recommends install cmake make python3-pip ninja-build curl libmpc3 && \
pip install conan --break-system-packages
ENV UPX_VER=4.2.4
RUN set -x && \
curl -LO https://github.com/upx/upx/releases/download/v${UPX_VER}/upx-${UPX_VER}-amd64_linux.tar.xz && \
xzdec upx-${UPX_VER}-amd64_linux.tar.xz | tar xf - && \
install upx-${UPX_VER}-amd64_linux/upx /usr/bin/upx && \
rm -rf upx-${UPX_VER}-amd64_linux upx-${UPX_VER}-amd64_linux.tar.xz
RUN conan profile detect --force && sed -i 's/x86_64/x86/g' ~/.conan2/profiles/default
COPY conanfile.txt /sources/
RUN set -x && \
mkdir -p /build && \
cd /build && \
conan install /sources --output-folder=. --build=missing
COPY . /sources/
RUN set -x && \
cd /build && \
cmake /sources -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -G Ninja && \
cmake --build . && \
upx -9 cli/dcw