github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/Dockerfile_standalone (about)

     1  FROM leafai/studio-go-runner-dev-base:0.0.5
     2  
     3  MAINTAINER karlmutch@gmail.com
     4  
     5  ENV LANG C.UTF-8
     6  ENV DEBIAN_FRONTEND noninteractive
     7  
     8  # Protobuf version
     9  ENV PROTOBUF_VERSION="3.12.3"
    10  ENV PROTOBUF_ZIP=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
    11  ENV PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOBUF_ZIP}
    12  
    13  RUN wget ${PROTOBUF_URL} && \
    14      unzip ${PROTOBUF_ZIP} -d /usr && \
    15      chmod +x /usr/bin/protoc && \
    16      find /usr/include/google -type d -print0 | xargs -0 chmod ugo+rx && \
    17      chmod -R +r /usr/include/google
    18  
    19  ENV GO_VERSION 1.14.4
    20  
    21  RUN \
    22      curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
    23      echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list && \
    24      apt-get update && \
    25      apt-get install -y kubectl && \
    26      mkdir -p /usr/local/bin && \
    27      opsys=linux && \
    28      (cd /usr/local/bin ; curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"  | bash)
    29  
    30  RUN \
    31      cd /var && \
    32      wget -q -O /tmp/go.tgz https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \
    33      tar xzf /tmp/go.tgz && \
    34      rm /tmp/go.tgz
    35  
    36  ENV GOROOT=/var/go
    37  ENV GOPATH=/project
    38  ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH:/project/.local/bin
    39  
    40  ENV LOGXI='*=INF'
    41  ENV LOGXI_FORMAT='happy,maxcol=1024'
    42  
    43  ENV ENCRYPT_DIR='/runner/certs/message'
    44  
    45  RUN \
    46      mkdir -p $GOPATH/bin && \
    47      (curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh)
    48  
    49  RUN \
    50      git config --global url."https://github.com/".insteadOf git@github.com: && \
    51      git config --global url."https://".insteadOf git:// && \
    52      go get github.com/karlmutch/enumer && \
    53      go get github.com/karlmutch/petname && \
    54      go install github.com/karlmutch/petname/cmd/petname && \
    55      wget -q -O $GOPATH/bin/semver https://github.com/karlmutch/duat/releases/download/0.13.0/semver-linux-amd64 && \
    56      wget -q -O $GOPATH/bin/stencil https://github.com/karlmutch/duat/releases/download/0.13.0/stencil-linux-amd64 && \
    57      chmod +x $GOPATH/bin/semver && \
    58      chmod +x $GOPATH/bin/stencil && \
    59      mkdir -p /runner/certs/message && \
    60      apt-get install -y rsync
    61  
    62  WORKDIR /project/src/github.com/leaf-ai/studio-go-runner
    63  
    64  LABEL author="Karl Mutch"
    65  
    66  # The following steps invalidates the cache at this point in the Dockerfile, stencil will substitute a
    67  # # new date time on every run changing the argument
    68  ARG CACHE_END="{{now}}"
    69  RUN CACHE_END=${CACHE_END} ls > /dev/null
    70  COPY . /project/src/github.com/leaf-ai/studio-go-runner/
    71  
    72  CMD /bin/bash -c './ci.sh'
    73  
    74  # Done last to prevent lots of disruption when bumping versions
    75  LABEL vendor="Open Source"