2019-04-06 06:09:21 +00:00
|
|
|
ARG REGISTRY_PREFIX=''
|
2019-05-24 23:57:04 +00:00
|
|
|
ARG CODENAME=3.9
|
2019-04-06 06:09:21 +00:00
|
|
|
|
2019-05-24 23:57:04 +00:00
|
|
|
FROM ${REGISTRY_PREFIX}alpine:${CODENAME} as builder
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
2019-05-24 23:57:04 +00:00
|
|
|
&& apk add --no-cache \
|
|
|
|
bash \
|
|
|
|
coreutils \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
make \
|
2019-04-06 06:09:21 +00:00
|
|
|
cmake \
|
2019-05-24 23:57:04 +00:00
|
|
|
ninja \
|
|
|
|
pkgconf \
|
2019-04-06 06:09:21 +00:00
|
|
|
rsync \
|
|
|
|
gdb \
|
2019-05-24 23:57:04 +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-24 23:57:04 +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-24 23:57:04 +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"
|
|
|
|
|
|
|
|
ARG FUSE_VERSION=3.1.1
|
|
|
|
|
|
|
|
RUN set -x \
|
2019-05-24 23:57:04 +00:00
|
|
|
&& builddeps="libtool automake autoconf gettext-dev m4 linux-headers" \
|
|
|
|
&& apk add --no-cache --virtual .build-deps $builddeps \
|
2019-04-06 06:09:21 +00:00
|
|
|
&& cd "/usr/local/src/libfuse-fuse-$FUSE_VERSION" \
|
|
|
|
&& ./makeconf.sh \
|
|
|
|
&& builddir="/tmp/out" \
|
|
|
|
&& mkdir -p "$builddir" \
|
|
|
|
&& cd "$builddir" \
|
|
|
|
&& "/usr/local/src/libfuse-fuse-$FUSE_VERSION/configure" \
|
|
|
|
&& make "$PARALLELMFLAGS" install \
|
|
|
|
&& rm -rf "$builddir" \
|
2019-05-24 23:57:04 +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-24 23:57:04 +00:00
|
|
|
&& apk add --no-cache \
|
2019-04-06 06:09:21 +00:00
|
|
|
ca-certificates \
|
|
|
|
openssl \
|
2019-05-24 23:57:04 +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-24 23:57:04 +00:00
|
|
|
ENV PKG_CONFIG_PATH=/usr/local/lib64/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-24 23:57:04 +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", "--"]
|
|
|
|
|
2019-04-17 15:25:56 +00:00
|
|
|
# unused
|
|
|
|
ARG QEMU_VERSION_=v3.1.0-2
|