github.com/kotovmak/go-admin@v1.1.1/Dockerfile (about) 1 # This file describes the standard way to build GoAdmin develop env image, and using container 2 # 3 # Usage: 4 # 5 # # Assemble the code dev environment, get related database tools in docker-compose.yml, It is slow the first time. 6 # docker build -t goadmin:1.0 . 7 # 8 # # Mount your source code to container for quick developing: 9 # docker run -v `pwd`:/home/goadmin --name -d goadmin:1.0 10 # docker exec -it goadmin /bin/bash 11 # # if your local code has been changed ,you can restart the container to take effect 12 # docker restart goadmin 13 # 14 15 FROM golang:latest 16 MAINTAINER josingcjx 17 COPY . /home/goadmin 18 ENV GOPATH=$GOPATH:/home/goadmin/ GOPROXY=https://mirrors.aliyun.com/goproxy,https://goproxy.cn,direct 19 RUN apt-get update --fix-missing && \ 20 apt-get install -y zip vim postgresql mysql-common default-mysql-server && \ 21 tar -C / -xvf /home/goadmin/tools/godependacy.tgz 22 #if install dependacy tools failed, you can copy local's to remote 23 #mkdir -p /go/bin && \ 24 #mv /home/goadmin/tools/{gotest,goimports,golint,golangci-lint,adm} /go/bin 25 #go get golang.org/x/tools/cmd/goimports && \ 26 #go get github.com/rakyll/gotest && \ 27 #go get -u golang.org/x/lint/golint && \ 28 #go install github.com/GoAdminGroup/adm@latest && \ 29 #go get -u github.com/golangci/golangci-lint/cmd/golangci-lint 30 WORKDIR /home/goadmin