2019-03-03 12:42:46 +00:00
|
|
|
ARG CODENAME=bionic
|
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
FROM arm32v7/ubuntu:$CODENAME as builder
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
COPY docker/qemu-arm-static-* /usr/bin/qemu-arm-static
|
2019-03-03 12:42:46 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
|
|
|
&& apt update \
|
2019-03-19 23:58:06 +00:00
|
|
|
&& apt upgrade -y \
|
2019-03-03 12:42:46 +00:00
|
|
|
&& apt install --yes --no-install-recommends \
|
|
|
|
build-essential \
|
|
|
|
cmake \
|
|
|
|
ninja-build \
|
2019-03-19 23:58:06 +00:00
|
|
|
pkg-config \
|
2019-03-28 06:43:21 +00:00
|
|
|
rsync \
|
2019-03-19 23:58:06 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
COPY src /usr/local/src
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
ARG PARALLELMFLAGS=-j2
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
ARG GTEST_VERSION=1.8.1
|
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& mkdir -p /tmp/out \
|
|
|
|
&& cd /tmp/out \
|
2019-03-23 01:17:44 +00:00
|
|
|
&& cmake "/usr/local/src/googletest-release-$GTEST_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& rm -rf /tmp/out
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
ARG FUSE_VERSION=3.1.1
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& apt update \
|
|
|
|
&& apt install --yes --no-install-recommends \
|
|
|
|
libtool \
|
|
|
|
automake \
|
|
|
|
gettext \
|
2019-03-23 01:17:44 +00:00
|
|
|
&& cd "/usr/local/src/libfuse-fuse-$FUSE_VERSION" \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& ./makeconf.sh \
|
|
|
|
&& mkdir -p /tmp/out \
|
|
|
|
&& cd /tmp/out \
|
2019-03-23 01:17:44 +00:00
|
|
|
&& "/usr/local/src/libfuse-fuse-$FUSE_VERSION/configure" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& rm -rf /tmp/out \
|
2019-03-19 23:58:06 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
ARG WEBSOCKETS_VERSION=3.1.0
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
RUN set -x \
|
2019-03-19 23:58:06 +00:00
|
|
|
&& apt update \
|
2019-03-03 12:42:46 +00:00
|
|
|
&& apt install --yes --no-install-recommends \
|
2019-03-20 23:43:53 +00:00
|
|
|
openssl \
|
2019-03-03 12:42:46 +00:00
|
|
|
libssl-dev \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& mkdir -p /tmp/out \
|
|
|
|
&& cd /tmp/out \
|
2019-03-23 01:17:44 +00:00
|
|
|
&& cmake "/usr/local/src/libwebsockets-$WEBSOCKETS_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& rm -rf /tmp/out \
|
2019-03-19 23:58:06 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
ARG JANSSON_VERSION=2.12
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
RUN set -x \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& mkdir -p /tmp/out \
|
|
|
|
&& cd /tmp/out \
|
2019-03-23 01:17:44 +00:00
|
|
|
&& cmake -DJANSSON_BUILD_DOCS=OFF "/usr/local/src/jansson-$JANSSON_VERSION" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& rm -rf /tmp/out
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-20 00:32:55 +00:00
|
|
|
ARG USERID=1000
|
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
ARG PROJECT_ROOT=/workspace/src
|
|
|
|
ARG OUT=/workspace/out
|
2019-03-23 01:17:44 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
|
|
|
&& useradd -u "$USERID" -ms /bin/bash user \
|
2019-03-28 06:43:21 +00:00
|
|
|
&& mkdir -p "$PROJECT_ROOT" "$OUT" \
|
|
|
|
&& chown user:user "$PROJECT_ROOT" "$OUT"
|
2019-03-20 00:32:55 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
WORKDIR "$OUT"
|
2019-03-03 12:42:46 +00:00
|
|
|
|