-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile_microk8s
67 lines (53 loc) · 2.47 KB
/
Dockerfile_microk8s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 2018-2021 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License.
#
FROM registry.container-registry.svc.cluster.local:5000/leafai/studio-go-runner-dev-stack:0.0.3
MAINTAINER karlmutch@gmail.com
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV GO_VERSION 1.16.6
RUN \
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list && \
apt-get update && \
apt-get install -y kubectl && \
mkdir -p /usr/local/bin && \
opsys=linux && \
(cd /usr/local/bin ; curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash)
RUN \
mkdir -p /project/go && \
mkdir -p /project/src/github.com/leaf-ai && \
cd /project && \
wget -q -O /tmp/go.tgz https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \
tar xzf /tmp/go.tgz && \
rm /tmp/go.tgz
ENV GOPATH=/project
ENV PATH=$GOPATH/bin:$PATH
ENV PATH=$PATH:/project/.local/bin:/project/go/bin
ENV GOROOT=/project/go
ENV LOGXI='*=INF'
ENV LOGXI_FORMAT='happy,maxcol=1024'
ENV ENCRYPT_DIR='/runner/certs/message'
RUN \
mkdir $GOPATH/bin && \
git config --global url."https://github.com/".insteadOf git@github.com: && \
git config --global url."https://".insteadOf git:// && \
go get github.com/alvaroloes/enumer@v1.1.2 && \
go install github.com/karlmutch/petname/cmd/petname@caff460d43c285c41278d0240c5fcd4759fc4e3b && \
wget -q -O $GOPATH/bin/semver https://github.com/karlmutch/duat/releases/download/0.15.5/semver-linux-amd64 && \
wget -q -O $GOPATH/bin/stencil https://github.com/karlmutch/duat/releases/download/0.15.5/stencil-linux-amd64 && \
chmod +x $GOPATH/bin/semver && \
chmod +x $GOPATH/bin/stencil && \
mkdir -p /runner/certs/message && \
rm /usr/bin/nvidia-* && \
apt-get install -y rsync
LABEL author="Karl Mutch"
LABEL vendor="Open Source"
WORKDIR /project/src/github.com/leaf-ai/studio-go-runner
# In order to invalidate the cache correctly for th next set of layers copy the git HASH to the container
# from the volume mounted into the build step provisioned by Mikasu
#
COPY .git/HEAD /tmp/HEAD
RUN cd /makisu-context && \
tar cf /project/src/github.com/leaf-ai/studio-go-runner/src.tar . && \
cat /makisu-context/.git/HEAD
CMD [ "/bin/bash", "-c", "tar xf src.tar && ./ci.sh" ]