Add iot-device-cube:1.0.4 dockerfiles
This commit is contained in:
Родитель
838e8fc005
Коммит
7d886d8c5d
|
@ -0,0 +1,3 @@
|
|||
## `iot-device-cube-1.0.3`
|
||||
|
||||
This serial of docker images installs Azure IoT C SDK using vcpkg.
|
|
@ -0,0 +1,51 @@
|
|||
# devicedevex.azurecr.io/public/iot-device-cube:1.0.4-azure-c-sdk-public-preview-cross-toolchain-arm32
|
||||
FROM devicedevex.azurecr.io/internal/iot-device-cube:1.0.0-ubuntu-cross-toolchain-arm32
|
||||
|
||||
ARG lib_openssl_uri=https://www.openssl.org/source/openssl-1.1.1c.tar.gz
|
||||
ARG lib_openssl_name=openssl-1.1.1c
|
||||
ARG lib_curl_uri=http://curl.haxx.se/download/curl-7.65.1.tar.gz
|
||||
ARG lib_curl_name=curl-7.65.1
|
||||
ARG lib_util_uri=https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.32/util-linux-2.32.1.tar.gz
|
||||
ARG lib_util_name=util-linux-2.32.1
|
||||
|
||||
WORKDIR /work
|
||||
COPY Toolchain.cmake /work/temp/Toolchain.cmake
|
||||
COPY arm-linux-custom.cmake /work/temp/arm-linux-custom.cmake
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget ca-certificates xz-utils cmake make git curl unzip tar && \
|
||||
wget ${lib_openssl_uri} && \
|
||||
tar -xvf ${lib_openssl_name}.tar.gz && \
|
||||
cd ${lib_openssl_name} && \
|
||||
./Configure linux-generic32 shared --prefix=${LIBC_PREFIX}/usr --openssldir=${LIBC_PREFIX}/usr && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
wget ${lib_curl_uri} && \
|
||||
tar -xvf ${lib_curl_name}.tar.gz && \
|
||||
cd ${lib_curl_name} && \
|
||||
./configure --with-sysroot=${LIBC_PREFIX} --prefix=${LIBC_PREFIX}/usr --target=${CROSS_TRIPLE} --with-ssl --with-zlib --host=${CROSS_TRIPLE} --build=x86_64-pc-linux-uclibc && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
wget ${lib_util_uri} && \
|
||||
tar -xvf ${lib_util_name}.tar.gz && \
|
||||
cd ${lib_util_name} && \
|
||||
./configure --prefix=${LIBC_PREFIX}/usr --with-sysroot=${LIBC_PREFIX} --target=${CROSS_TRIPLE} --host=${CROSS_TRIPLE} --disable-all-programs --disable-bash-completion --enable-libuuid && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
ls | grep -v temp | xargs rm -rf && \
|
||||
git clone https://github.com/jspaith/vcpkg/ --branch iot-provisioning3 && \
|
||||
cd vcpkg && \
|
||||
cp /work/temp/Toolchain.cmake /work/vcpkg/scripts/toolchains/Toolchain.cmake && \
|
||||
cp /work/temp/arm-linux-custom.cmake /work/vcpkg/triplets/arm-linux-custom.cmake && \
|
||||
ln -s /usr/xcc/arm-linux-gnueabihf/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3 /lib/ld-linux-armhf.so.3 && \
|
||||
export LD_LIBRARY_PATH="${LIBC_PREFIX}:${LIBC_PREFIX}/lib" && \
|
||||
./bootstrap-vcpkg.sh
|
||||
WORKDIR /work/vcpkg
|
||||
ENV LD_LIBRARY_PATH="${LIBC_PREFIX}:${LIBC_PREFIX}/lib:${LIBC_PREFIX}:${LIBC_PREFIX}/libc/lib"
|
||||
RUN ./vcpkg install azure-iot-sdk-c[public-preview,use_prov_client]:arm-linux-custom && \
|
||||
apt-get remove -y wget ca-certificates xz-utils git curl unzip && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
|
@ -0,0 +1,14 @@
|
|||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set(CMAKE_C_COMPILER ${CC})
|
||||
set(CMAKE_CXX_COMPILER ${CXX})
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${CROSS_ROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
set(CMAKE_SYSROOT ${CROSS_ROOT})
|
||||
|
||||
SET(set_trusted_cert_in_samples true CACHE BOOL "Force use of TrustedCerts option" FORCE)
|
|
@ -0,0 +1,6 @@
|
|||
set(VCPKG_TARGET_ARCHITECTURE arm)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE /work/vcpkg/scripts/toolchains/Toolchain.cmake)
|
|
@ -0,0 +1,49 @@
|
|||
# devicedevex.azurecr.io/public/iot-device-cube:1.0.4-azure-c-sdk-public-preview-cross-toolchain-arm64
|
||||
FROM devicedevex.azurecr.io/internal/iot-device-cube:1.0.0-ubuntu-arm64
|
||||
|
||||
ARG lib_openssl_uri=https://www.openssl.org/source/openssl-1.0.2o.tar.gz
|
||||
ARG lib_openssl_name=openssl-1.0.2o
|
||||
ARG lib_curl_uri=http://curl.haxx.se/download/curl-7.60.0.tar.gz
|
||||
ARG lib_curl_name=curl-7.60.0
|
||||
ARG lib_util_uri=https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.32/util-linux-2.32-rc2.tar.gz
|
||||
ARG lib_util_name=util-linux-2.32-rc2
|
||||
|
||||
WORKDIR /work
|
||||
COPY Toolchain.cmake /work/temp/Toolchain.cmake
|
||||
COPY aarch64-linux-custom.cmake /work/temp/aarch64-linux-custom.cmake
|
||||
|
||||
WORKDIR /work
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends ca-certificates wget perl make cmake git curl unzip tar && \
|
||||
wget ${lib_openssl_uri} && \
|
||||
tar -xvf ${lib_openssl_name}.tar.gz && \
|
||||
cd ${lib_openssl_name} && \
|
||||
./Configure linux-generic32 shared --prefix=${QEMU_LD_PREFIX}/usr --openssldir=${QEMU_LD_PREFIX}/usr && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
wget ${lib_curl_uri} && \
|
||||
tar -xvf ${lib_curl_name}.tar.gz && \
|
||||
cd ${lib_curl_name} && \
|
||||
./configure --with-sysroot=${QEMU_LD_PREFIX} --prefix=${QEMU_LD_PREFIX}/usr --target=${CROSS_TRIPLE} --with-ssl --with-zlib --host=${CROSS_TRIPLE} --build=x86_64-pc-linux-uclibc && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
wget ${lib_util_uri} && \
|
||||
tar -xvf ${lib_util_name}.tar.gz && \
|
||||
cd ${lib_util_name} && \
|
||||
./configure --prefix=${QEMU_LD_PREFIX}/usr --with-sysroot=${QEMU_LD_PREFIX} --target=${CROSS_TRIPLE} --host=${CROSS_TRIPLE} --disable-all-programs --disable-bash-completion --enable-libuuid && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
ls | grep -v temp | xargs rm -rf && \
|
||||
git clone https://github.com/jspaith/vcpkg/ --branch iot-provisioning3 && \
|
||||
cd vcpkg && \
|
||||
cp /work/temp/Toolchain.cmake /work/vcpkg/scripts/toolchains/Toolchain.cmake && \
|
||||
cp /work/temp/aarch64-linux-custom.cmake /work/vcpkg/triplets/aarch64-linux-custom.cmake && \
|
||||
./bootstrap-vcpkg.sh
|
||||
WORKDIR /work/vcpkg
|
||||
RUN ./vcpkg install azure-iot-sdk-c[public-preview,use_prov_client]:aarch64-linux-custom && \
|
||||
apt-get remove -y wget ca-certificates perl git unzip && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
|
@ -0,0 +1,18 @@
|
|||
# set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(cross_triple "aarch64-linux-gnu")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/libc)
|
|
@ -0,0 +1,6 @@
|
|||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE /work/vcpkg/scripts/toolchains/Toolchain.cmake)
|
|
@ -0,0 +1,15 @@
|
|||
# devicedevex.azurecr.io/public/iot-device-cube:1.0.4-azure-c-sdk-public-preview-ubuntu-x86
|
||||
FROM ubuntu:18.04
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git cmake build-essential libcurl4-openssl-dev libssl-dev uuid-dev curl unzip tar && \
|
||||
git clone https://github.com/jspaith/vcpkg/ --branch iot-provisioning3 && \
|
||||
cd vcpkg && \
|
||||
./bootstrap-vcpkg.sh
|
||||
WORKDIR /work/vcpkg
|
||||
RUN ./vcpkg install azure-iot-sdk-c[public-preview,use_prov_client] && \
|
||||
apt-get remove -y git unzip && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
Загрузка…
Ссылка в новой задаче