File tree Expand file tree Collapse file tree 3 files changed +17
-24
lines changed
Expand file tree Collapse file tree 3 files changed +17
-24
lines changed Original file line number Diff line number Diff line change 1- FROM golang:latest
1+ FROM golang:alpine
22MAINTAINER Toomore Chiang <toomore0929@gmail.com>
33
44WORKDIR /go/src/github.com/toomore/gogrs/
@@ -15,6 +15,8 @@ ADD ./doc.go ./
1515ADD ./goclean.sh ./
1616
1717RUN \
18+ apk update && apk add bash git build-base && \
19+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
1820 go get github.com/golang/lint/golint && \
1921 go get golang.org/x/tools/cmd/goimports && \
2022 go get -v ./...
Original file line number Diff line number Diff line change 1- FROM debian:jessie
1+ FROM alpine:latest
22MAINTAINER Toomore Chiang <toomore0929@gmail.com>
33
4- RUN apt-get update && apt-get install -y ca-certificates && \
5- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4+ WORKDIR /bin
65
7- ADD ./twsereport /usr/local/bin /
8- ADD ./twsecache /usr/local/bin/
9- ADD ./realtime /usr/local/bin/
10- ADD ./tradingdays_server /usr/local/bin/
6+ ADD ./gogrs_bin . /
7+
8+ RUN apk update && apk add ca-certificates && \
9+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- BASE=$( pwd)
3+ docker run -it --rm -v $( pwd) /gogrs_bin:/gogrs_bin gogrs:latest \
4+ bash -c " cp /go/bin/gogrs_example /gogrs_bin;
5+ cp /go/bin/realtime /gogrs_bin;
6+ cp /go/bin/tradingdays_server /gogrs_bin;
7+ cp /go/bin/twsecache /gogrs_bin;
8+ cp /go/bin/twsereport /gogrs_bin;"
49
5- cd $GOPATH /src/github.com/toomore/gogrs
6- go get -v ./...
10+ docker build -t gogrs:mini ./
711
8- cd $GOPATH /bin
9- cp ./twsereport $BASE
10- cp ./realtime $BASE
11- cp ./twsecache $BASE
12- cp ./tradingdays_server $BASE
13-
14- cd $BASE
15- docker build -t toomore/gogrs-mini .
16-
17- rm -rf ./twsereport
18- rm -rf ./realtime
19- rm -rf ./twsecache
20- rm -rf ./tradingdays_server
12+ sudo rm -rf ./gogrs_bin
You can’t perform that action at this time.
0 commit comments