Sign inSign up

mizumono/smartlockers-base

By mizumono

•Updated almost 6 years ago

arm32v7 debian base with build-essentials, autoconf-archive, libboost-all-dev and qemu-arm-static

Image
0

1.2K

mizumono/smartlockers-base repository overview

⁠ARM32v7 image build on x86_64 host using QEMU

⁠Why qemu-user-static ?

For cross image build (e.g. building arm32v7 over x86 host etc.) there are two options that I know about..

ONE option is to use buildx, which is relatively new experimental plugin. But I'm building this image using Azure dev. ops pipeline and Microsoft forked original docker and build its own release which doesn't have buildx plugin. Some stupid licensing issue etc. You can still build using buildx if you're running on your own host system. I believe the commands will go more or less like this but I'm not sure as not using these now and copied from my old read me files

export DOCKER_BUILDKIT=1
docker build --platform=local -o . git://github.com/docker/buildx
mkdir -p ~/.docker/cli-plugins
mv buildx ~/.docker/cli-plugins/docker-buildx
docker buildx rm builder
docker buildx create --name builder --driver docker-container --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm/v7 -t smartlockers:latest . --push 
#**NOTE** --load [load won't work for more than one platform buildx]

SECOND option is to use QEMU and that works if you've it installed on host system. I'm using these steps in Azure pipeline..

sudo apt-get update && sudo apt-get install qemu-user-static -y
docker run --rm --privileged multiarch/qemu-user-static:register --reset
cp /usr/bin/qemu-arm-static $(Build.SourcesDirectory)

⁠DockerFile

ARG BASEIMAGE=debian
ARG ARCH=arm32v7

FROM ${ARCH}/${BASEIMAGE} AS devbase
USER root
WORKDIR /root
COPY qemu-arm-static /usr/bin
RUN apt-get update && apt-get install -y \
	autoconf-archive \
	build-essential \
	libboost-all-dev \
	libgflags-dev \
	libbluetooth-dev \
	libreadline-dev \
	libglib2.0-dev \
	bluez \
	cmake \
	cmake-data \
	pkg-config \
	rpm \
&& rm -rf /var/lib/apt/lists/*

echo "*** compiling external sources ***"

ADD 3rd-party/ 3rd-party/
#gattlib from https://github.com/labapart/gattlib
WORKDIR 3rd-party/gattlib
RUN mkdir -p build 
WORKDIR build
RUN cmake -DGATTLIB_BUILD_DOCS=OFF .. \
&& make && make install
RUN cpack -DCPACK_PACKAGE_INSTALL_DIRECTORY=/usr/local ..
RUN dpkg -i *.deb
WORKDIR ../
RUN rm -rf build/

Tag summary

Content type

Image

Digest

Size

410 MB

Last updated

almost 6 years ago

docker pull mizumono/smartlockers-base