Sha256: 586e94a0c346b183515e61932009b12e42666cfffe9efacc37a795d1b32556e5

Contents?: true

Size: 1.73 KB

Versions: 3

Compression:

Stored size: 1.73 KB

Contents

FROM ubuntu:16.04

# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
    g++ \
    gcc \
    libc6-dev \
    make \
    pkg-config \
    swig \
    doxygen \
    curl \
    ca-certificates \
    git \
    wget \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

# install cmake
ENV CMAKE_VERSION 3.10.2
RUN  wget https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz \
     && tar xvfz cmake-${CMAKE_VERSION}.tar.gz \
     && cd cmake-${CMAKE_VERSION} \
     && ./bootstrap \
     && make -j4 \
     && make install \
     && cd - \
     && rm -rf ./cmake-*

# install golang
ENV GOLANG_VERSION 1.10.2
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 4b677d698c65370afa33757b6954ade60347aaca310ea92a63ed717d7cb0c2ff

RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    && echo "$GOLANG_DOWNLOAD_SHA256  golang.tar.gz" | sha256sum -c - \
    && tar -C /usr/local -xzf golang.tar.gz \
    && rm golang.tar.gz

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH

# build virgil-crypto-go
ADD . virgil-crypto

RUN cd virgil-crypto \
    && cmake -H. -B_build -DCMAKE_INSTALL_PREFIX=_install -DLANG=go -DINSTALL_CORE_LIBS=ON -DVIRGIL_CRYPTO_FEATURE_PYTHIA=ON \
    && cmake --build _build --target install

# v4
RUN go get -d gopkg.in/virgilsecurity/virgil-crypto-go.v4 \
    && cp -r virgil-crypto/_install/* $GOPATH/src/gopkg.in/virgilsecurity/virgil-crypto-go.v4

# v5
RUN go get -d gopkg.in/virgilsecurity/virgil-crypto-go.v5 \
    && cp -r virgil-crypto/_install/* $GOPATH/src/gopkg.in/virgilsecurity/virgil-crypto-go.v5

# cleanup
RUN rm -rf virgil-crypto

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
virgil-crypto-3.6.4 ext/native/src/Dockerfile_Golang
virgil-crypto-3.6.3 ext/native/src/Dockerfile_Golang
virgil-crypto-3.6.2 ext/native/src/Dockerfile_Golang