forked from studygolang/studygolang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.web
31 lines (27 loc) · 914 Bytes
/
Dockerfile.web
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
# This file decribes the standard way to build stadygolang, using docker
#
# # Usage
#
# # # download the src and enter the dir first
# docker build -f Dockerfile.web -t studygolang .
#
# docker run --name mysqlDB -e MYSQL_ROOT_PASSWORD=123456 -d mysql
# docker run -d --name studygolang-web -v `pwd`:/studyglang -p 8090:8088 --link mysqlDB:db.localhost studygolang ./docker-entrypoint.sh
#
# # inside the container
# bin/studygolang
#
# # just compile
# docker run --rm -v `pwd`:/studyglang ./install.sh
# # and in production environment just put this binary file in jockerxu/ubuntu-golang and run it
FROM jockerxu/ubuntu-golang
MAINTAINER jockerxu <156082052@qq.com>
# download dep
RUN go get github.com/polaris1119/gvt
WORKDIR /studygolang
COPY . /studygolang
RUN cd src/ && gvt restore
RUN mkdir -p /vendor/src/ && mv src/vendor/* /vendor/src/
ENV GOPATH $GOPATH:/vendor
# run
CMD ["docker-entrypoint.sh"]