forked from leaf-ai/studio-go-runner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_standalone
64 lines (49 loc) · 2.31 KB
/
Dockerfile_standalone
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
# Copyright 2018-2021 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License.
#
FROM leafai/studio-go-runner-dev-stack:0.0.3
MAINTAINER [email protected]
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 \
cd /var && \
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 GOROOT=/var/go
ENV GOPATH=/project
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH:/project/.local/bin
ENV LOGXI='*=INF'
ENV LOGXI_FORMAT='happy,maxcol=1024'
ENV ENCRYPT_DIR='/runner/certs/message'
RUN \
git config --global url."https://github.com/".insteadOf [email protected]: && \
git config --global url."https://".insteadOf git:// && \
go get github.com/alvaroloes/[email protected] && \
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 && \
apt-get install -y rsync
RUN mkdir -p /runner/certs/message && \
mkdir -p /runner/certs/queues
WORKDIR /project/src/github.com/leaf-ai/studio-go-runner
LABEL author="Karl Mutch"
# The following steps invalidates the cache at this point in the Dockerfile, stencil will substitute a
# # new date time on every run changing the argument
ARG CACHE_END="{{now}}"
RUN CACHE_END=${CACHE_END} ls > /dev/null
COPY . /project/src/github.com/leaf-ai/studio-go-runner/
CMD /bin/bash -c './ci.sh'
# Done last to prevent lots of disruption when bumping versions
LABEL vendor="Open Source"