"Fossies" - the Fresh Open Source Software Archive

Member "wire-server-2021-10-01/build/alpine/Dockerfile.prebuilder" (4 Oct 2021, 1761 Bytes) of package /linux/misc/wire-server-2021-10-01.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Requires docker >= 17.05 (requires support for multi-stage builds)
    2 
    3 FROM alpine:3.12 as cryptobox-builder
    4 
    5 # compile cryptobox-c
    6 RUN apk add --no-cache cargo file libsodium-dev git && \
    7     cd /tmp && \
    8     git clone https://github.com/wireapp/cryptobox-c.git && \
    9     cd cryptobox-c && \
   10     export SODIUM_USE_PKG_CONFIG=1 && \
   11     cargo build --release
   12 
   13 FROM alpine:3.12
   14 
   15 # install cryptobox-c in the new container
   16 COPY --from=cryptobox-builder /tmp/cryptobox-c/target/release/libcryptobox.so /usr/lib/libcryptobox.so
   17 COPY --from=cryptobox-builder /tmp/cryptobox-c/src/cbox.h /usr/include/cbox.h
   18 
   19 # development packages required for wire-server Haskell services
   20 RUN apk add --no-cache \
   21         alpine-sdk \
   22         ca-certificates \
   23         linux-headers \
   24         zlib-dev \
   25         perl \
   26         gmp-dev \
   27         libffi-dev \
   28         make \
   29         libsodium-dev \
   30         openssl-dev \
   31         protobuf \
   32         icu-dev \
   33         geoip-dev \
   34         snappy-dev \
   35         llvm-libunwind-dev \
   36         bash \
   37         xz \
   38         libxml2-dev \
   39         git \
   40         ncurses \
   41         ncurses-dev \
   42         sed
   43 
   44 # get static version of Haskell Stack and use system ghc by default
   45 ARG STACK_ALPINE_VERSION=2.3.1
   46 RUN curl -sSfL https://github.com/commercialhaskell/stack/releases/download/v${STACK_ALPINE_VERSION}/stack-${STACK_ALPINE_VERSION}-linux-x86_64-static.tar.gz \
   47     | tar --wildcards -C /usr/local/bin --strip-components=1 -xzvf - '*/stack' && chmod 755 /usr/local/bin/stack && \
   48     stack config set system-ghc --global true
   49 
   50 ARG GHC_VERSION=8.8.4
   51 RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org \
   52   | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=${GHC_VERSION} sh
   53 
   54 ENV PATH=/root/.ghcup/bin:${PATH}