2019-04-06 06:09:21 +00:00
|
|
|
ARG REGISTRY_PREFIX=''
|
2019-05-25 00:44:32 +00:00
|
|
|
ARG CODENAME=3.9
|
2019-04-06 06:09:21 +00:00
|
|
|
|
2019-05-25 00:44:32 +00:00
|
|
|
FROM ${REGISTRY_PREFIX}arm32v7/alpine:${CODENAME} as builder
|
2019-04-06 06:09:21 +00:00
|
|
|
|
2019-12-01 18:01:40 +00:00
|
|
|
ARG QEMU_VERSION_=v4.1.0-1
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
COPY docker/qemu-arm-static-$QEMU_VERSION_ /usr/bin/qemu-arm-static
|
|
|
|
|
|
|
|
RUN set -x \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& apk add --no-cache \
|
|
|
|
bash \
|
|
|
|
coreutils \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
make \
|
2019-04-06 06:09:21 +00:00
|
|
|
cmake \
|
2019-05-25 00:44:32 +00:00
|
|
|
ninja \
|
|
|
|
pkgconf \
|
2019-04-06 06:09:21 +00:00
|
|
|
rsync \
|
|
|
|
gdb \
|
2019-05-25 00:44:32 +00:00
|
|
|
valgrind \
|
|
|
|
util-linux \
|
|
|
|
util-linux-dev
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
COPY src /usr/local/src
|
|
|
|
|
|
|
|
ARG PARALLELMFLAGS=-j2
|
|
|
|
|
|
|
|
ARG DUMB_INIT_VERSION=1.2.2
|
|
|
|
|
|
|
|
RUN set -x \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& builddeps="vim" \
|
|
|
|
&& apk add --no-cache --virtual .build-deps $builddeps \
|
2019-04-06 06:09:21 +00:00
|
|
|
&& builddir="/tmp/out" \
|
|
|
|
&& mkdir -p "$builddir" \
|
|
|
|
&& cd "$builddir" \
|
|
|
|
&& cp -R "/usr/local/src/dumb-init-$DUMB_INIT_VERSION" . \
|
|
|
|
&& cd "dumb-init-$DUMB_INIT_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" \
|
|
|
|
&& chmod +x dumb-init \
|
|
|
|
&& mv dumb-init /usr/local/bin/dumb-init \
|
|
|
|
&& dumb-init --version \
|
|
|
|
&& rm -rf "$builddir" \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& apk del .build-deps
|
2019-04-06 06:09:21 +00:00
|
|
|
|
2019-12-01 10:10:17 +00:00
|
|
|
ARG GTEST_VERSION=1.10.0
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
|
|
|
&& builddir="/tmp/out" \
|
|
|
|
&& mkdir -p "$builddir" \
|
|
|
|
&& cd "$builddir" \
|
|
|
|
&& cmake "/usr/local/src/googletest-release-$GTEST_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
|
|
|
&& rm -rf "$builddir"
|
|
|
|
|
2019-12-01 19:27:10 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& builddeps="linux-headers udev eudev-dev python3 py3-pip py3-setuptools py3-cryptography ninja" \
|
|
|
|
&& apk add --no-cache --virtual .build-deps $builddeps \
|
|
|
|
&& pip3 install meson
|
|
|
|
|
|
|
|
ARG FUSE_VERSION=3.8.0
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
2019-12-01 19:27:10 +00:00
|
|
|
&& builddeps="libtool automake autoconf gettext-dev m4" \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& apk add --no-cache --virtual .build-deps $builddeps \
|
2019-04-06 06:09:21 +00:00
|
|
|
&& builddir="/tmp/out" \
|
|
|
|
&& mkdir -p "$builddir" \
|
|
|
|
&& cd "$builddir" \
|
2019-12-01 19:27:10 +00:00
|
|
|
&& meson "/usr/local/src/libfuse-fuse-$FUSE_VERSION" \
|
|
|
|
&& ninja \
|
|
|
|
&& ninja install \
|
2019-04-06 06:09:21 +00:00
|
|
|
&& rm -rf "$builddir" \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& apk del .build-deps
|
2019-04-06 06:09:21 +00:00
|
|
|
|
2019-12-01 10:13:53 +00:00
|
|
|
ARG WEBSOCKETS_VERSION=3.2.0
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& apk add --no-cache \
|
2019-04-06 06:09:21 +00:00
|
|
|
ca-certificates \
|
|
|
|
openssl \
|
2019-05-25 00:44:32 +00:00
|
|
|
openssl-dev \
|
2019-04-06 06:09:21 +00:00
|
|
|
&& builddir="/tmp/out" \
|
|
|
|
&& mkdir -p "$builddir" \
|
|
|
|
&& cd "$builddir" \
|
|
|
|
&& cmake "/usr/local/src/libwebsockets-$WEBSOCKETS_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
|
|
|
&& rm -rf "$builddir"
|
|
|
|
|
|
|
|
ARG JANSSON_VERSION=2.12
|
|
|
|
|
|
|
|
RUN set -x \
|
|
|
|
&& builddir="/tmp/out" \
|
|
|
|
&& mkdir -p "$builddir" \
|
|
|
|
&& cd "$builddir" \
|
|
|
|
&& cmake -DJANSSON_BUILD_DOCS=OFF "/usr/local/src/jansson-$JANSSON_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
|
|
|
&& rm -rf "$builddir"
|
|
|
|
|
|
|
|
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
2019-05-25 00:44:32 +00:00
|
|
|
ENV PKG_CONFIG_PATH=/usr/local/lib32/pkgconfig
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
ARG USERID=1000
|
|
|
|
|
2019-04-17 15:25:56 +00:00
|
|
|
ARG PROJECTDIR=/workspace/src
|
|
|
|
ARG OUTDIR=/workspace/out
|
|
|
|
ARG SCRIPTDIR=/workspace/bin
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
2019-05-25 00:44:32 +00:00
|
|
|
&& adduser -u "$USERID" -s /bin/bash -D user \
|
2019-04-17 15:25:56 +00:00
|
|
|
&& mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \
|
|
|
|
&& chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR"
|
2019-04-06 06:09:21 +00:00
|
|
|
|
2019-04-17 15:25:56 +00:00
|
|
|
WORKDIR "$OUTDIR"
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["dumb-init", "--"]
|
|
|
|
|