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"
|
|
|
|
|
2020-03-20 16:03:33 +00:00
|
|
|
ARG FUSE_VERSION=3.9.1
|
2019-04-06 06:09:21 +00:00
|
|
|
|
|
|
|
RUN set -x \
|
2019-12-02 19:21:19 +00:00
|
|
|
&& builddeps="linux-headers eudev-dev python3 py3-pip py3-setuptools py3-cryptography" \
|
2019-05-24 23:57:04 +00:00
|
|
|
&& apk add --no-cache --virtual .build-deps $builddeps \
|
2019-12-02 19:21:19 +00:00
|
|
|
&& pip3 install meson \
|
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" \
|
|
|
|
&& meson configure -Dexamples=false \
|
|
|
|
&& ninja \
|
|
|
|
&& ninja install \
|
2019-12-02 19:21:19 +00:00
|
|
|
&& pip3 uninstall -y meson \
|
2019-04-06 06:09:21 +00:00
|
|
|
&& 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", "--"]
|