blob: 429203a3c7ab406dbbf651b6cafadfdf77ea676e [file] [log] [blame]
David K. Bainbridgef0da8732016-06-01 16:15:37 -07001FROM ubuntu:14.04
2
3# Base image information borrowed by official golang wheezy Dockerfile
4RUN apt-get update && apt-get install -y --no-install-recommends \
5 g++ \
6 gcc \
7 libc6-dev \
8 make \
9 curl \
10 && rm -rf /var/lib/apt/lists/*
11
12ENV GOLANG_VERSION 1.6.2
13ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
14ENV GOLANG_DOWNLOAD_SHA256 e40c36ae71756198478624ed1bb4ce17597b3c19d243f3f0899bb5740d56212a
15
16RUN curl -kfsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
17 && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
18 && tar -C /usr/local -xzf golang.tar.gz \
19 && rm golang.tar.gz
20
21ENV GOPATH /go
22ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
23
24RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
25
26# CORD Provisioner Dockerfile
David K. Bainbridge97ee8052016-06-14 00:52:07 -070027WORKDIR /go
David K. Bainbridgef0da8732016-06-01 16:15:37 -070028
29RUN apt-get update && \
30 apt-get install -y software-properties-common && \
31 apt-add-repository ppa:ansible/ansible && \
32 apt-get update -y -m && \
33 apt-get install -y git ansible
34
David K. Bainbridge8352c592016-06-02 12:48:37 -070035RUN mkdir -p /root/.ssh
36COPY ssh-config /root/.ssh/config
37
David K. Bainbridgef0da8732016-06-01 16:15:37 -070038RUN go get github.com/tools/godep
David K. Bainbridge97ee8052016-06-14 00:52:07 -070039ADD . /go/src/gerrit.opencord.org/maas/cord-provisioner
David K. Bainbridgef0da8732016-06-01 16:15:37 -070040
David K. Bainbridge97ee8052016-06-14 00:52:07 -070041WORKDIR /go/src/gerrit.opencord.org/maas/cord-provisioner
David K. Bainbridgef0da8732016-06-01 16:15:37 -070042RUN $GOPATH/bin/godep restore
43
44WORKDIR $GOPATH
David K. Bainbridge97ee8052016-06-14 00:52:07 -070045RUN go install gerrit.opencord.org/maas/cord-provisioner
David K. Bainbridgef0da8732016-06-01 16:15:37 -070046
David K. Bainbridged86d96d2016-06-01 17:28:46 -070047ENTRYPOINT ["/go/bin/cord-provisioner"]