-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
52 lines (37 loc) · 1.27 KB
/
Dockerfile
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
FROM golang:1.13
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
# install zsh
RUN apt-get -q -q update && \
apt-get -y install git jq curl zsh vim telnet etcd
RUN chsh -s /bin/zsh
RUN sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
#RUN git clone [email protected]:stolk/imcat.git /go/src/imcat
#RUN cd /go/src/imcat && make && mv imcat /go/bin/imcat
#RUN apt-get install graphviz
# install nginx
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# install git
RUN mkdir /srv/git
# This can speed up future builds because of cache, only rebuild when vendors are
# added.
ENV GOPROXY=http://goproxy.cn
ENV GO111MODULE=on
ENV GOPROXY=http://goproxy.cn
VOLUME ["/srv/git"]
RUN go install github.com/mattn/goreman
RUN go install github.com/loov/watchrun
RUN mkdir /nutshell /nutshell/_example /nutshell/bin
ADD . /go/src/nutshell/
WORKDIR /go/src/nutshell/
RUN go build -o /go/src/nutshell/_example/main _example/apps/main.go
COPY _example/index.html /go/src/nutshell/_example/index.html
RUN go build -o /go/bin/nutlet nutlet/main.go
RUN chmod 777 /go/bin/nutlet
RUN go build -o /go/bin/nutctl nutctl/main.go
RUN chmod 777 /go/bin/nutctl
ENV PATH="/go/bin:${PATH}"
WORKDIR /go/src/nutshell/_example
EXPOSE 80
ENTRYPOINT nutlet