1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/docker/amd64-ubuntu-builder.dockerfile
nosamad 6d7f38baa0 refactors docker build
fixes issue when upgrading dependency versions
makes container workspace configurable
2019-03-23 02:17:44 +01:00

81 lines
1.7 KiB
Docker

ARG CODENAME=bionic
FROM ubuntu:$CODENAME as builder
RUN set -x \
&& apt update \
&& apt upgrade -y \
&& apt install --yes --no-install-recommends \
build-essential \
cmake \
ninja-build \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
COPY src /usr/local/src
ARG PARALLELMFLAGS=-j2
ARG GTEST_VERSION=1.8.1
RUN set -x \
&& mkdir -p /tmp/out \
&& cd /tmp/out \
&& cmake "/usr/local/src/googletest-release-$GTEST_VERSION" \
&& make "$PARALLELMFLAGS" install \
&& rm -rf /tmp/out
ARG FUSE_VERSION=3.1.1
RUN set -x \
&& apt update \
&& apt install --yes --no-install-recommends \
libtool \
automake \
gettext \
&& cd "/usr/local/src/libfuse-fuse-$FUSE_VERSION" \
&& ./makeconf.sh \
&& mkdir -p /tmp/out \
&& cd /tmp/out \
&& "/usr/local/src/libfuse-fuse-$FUSE_VERSION/configure" \
&& make "$PARALLELMFLAGS" install \
&& rm -rf /tmp/out \
&& rm -rf /var/lib/apt/lists/*
ARG WEBSOCKETS_VERSION=3.1.0
RUN set -x \
&& apt update \
&& apt install --yes --no-install-recommends \
openssl \
libssl-dev \
&& mkdir -p /tmp/out \
&& cd /tmp/out \
&& cmake "/usr/local/src/libwebsockets-$WEBSOCKETS_VERSION" \
&& make "$PARALLELMFLAGS" install \
&& rm -rf /tmp/out \
&& rm -rf /var/lib/apt/lists/*
ARG JANSSON_VERSION=2.12
RUN set -x \
&& mkdir -p /tmp/out \
&& cd /tmp/out \
&& cmake -DJANSSON_BUILD_DOCS=OFF "/usr/local/src/jansson-$JANSSON_VERSION" \
&& make "$PARALLELMFLAGS" install \
&& rm -rf /tmp/out
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
ARG USERID=1000
ARG WORKSPACE=/workspace
RUN set -x \
&& useradd -u "$USERID" -ms /bin/bash user \
&& mkdir -p "$WORKSPACE" \
&& chown user:user "$WORKSPACE"
WORKDIR "$WORKSPACE"