github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/Dockerfile_microk8s (about) 1 FROM registry.container-registry.svc.cluster.local:5000/leafai/studio-go-runner-dev-base:0.0.5 2 3 MAINTAINER karlmutch@gmail.com 4 5 ENV LANG C.UTF-8 6 7 # Protobuf version 8 ENV PROTOBUF_VERSION="3.12.3" 9 ENV PROTOBUF_ZIP=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip 10 ENV PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOBUF_ZIP} 11 12 RUN wget ${PROTOBUF_URL} && \ 13 unzip ${PROTOBUF_ZIP} -d /usr && \ 14 chmod +x /usr/bin/protoc && \ 15 find /usr/include/google -type d -print0 | xargs -0 chmod ugo+rx && \ 16 chmod -R +r /usr/include/google 17 18 ENV GO_VERSION 1.14.4 19 20 RUN \ 21 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \ 22 echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list && \ 23 apt-get update && \ 24 apt-get install -y kubectl && \ 25 mkdir -p /usr/local/bin && \ 26 opsys=linux && \ 27 (cd /usr/local/bin ; curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash) 28 29 RUN \ 30 mkdir -p /project/go && \ 31 mkdir -p /project/src/github.com/leaf-ai && \ 32 cd /project && \ 33 wget -q -O /tmp/go.tgz https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \ 34 tar xzf /tmp/go.tgz && \ 35 rm /tmp/go.tgz 36 37 ENV GOPATH=/project 38 ENV PATH=$GOPATH/bin:$PATH 39 ENV PATH=$PATH:/project/.local/bin:/project/go/bin 40 ENV GOROOT=/project/go 41 42 ENV LOGXI='*=INF' 43 ENV LOGXI_FORMAT='happy,maxcol=1024' 44 45 ENV ENCRYPT_DIR='/runner/certs/message' 46 47 RUN \ 48 mkdir $GOPATH/bin && \ 49 (curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh) && \ 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 rm /usr/bin/nvidia-* && \ 61 apt-get install -y rsync 62 63 LABEL author="Karl Mutch" 64 LABEL vendor="Open Source" 65 66 WORKDIR /project/src/github.com/leaf-ai/studio-go-runner 67 68 # In order to invalidate the cache correctly for th next set of layers copy the git HASH to the container 69 # from the volume mounted into the build step provisioned by Mikasu 70 # 71 COPY .git/HEAD /tmp/HEAD 72 73 RUN cd /makisu-context && \ 74 tar cf /project/src/github.com/leaf-ai/studio-go-runner/src.tar . && \ 75 cat /makisu-context/.git/HEAD 76 77 CMD [ "/bin/bash", "-c", "tar xf src.tar && ./ci.sh" ]