forked from gobuffalo/buffalo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.slim.build
44 lines (32 loc) · 1.37 KB
/
Dockerfile.slim.build
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
FROM golang:alpine
EXPOSE 3000
ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo
ENV GOPROXY=https://proxy.golang.org
RUN apk add --no-cache --upgrade apk-tools \
&& apk add --no-cache bash curl openssl git build-base nodejs npm postgresql libpq postgresql-contrib sqlite sqlite-dev mysql-client vim
RUN go version && go get -v -u github.com/markbates/deplist/deplist
RUN go get -v -u github.com/gobuffalo/flect \
&& go get -v -u github.com/gobuffalo/makr \
&& go get -v -u github.com/gobuffalo/packr/v2 \
&& go get -v -u github.com/gobuffalo/tags \
&& go get -v -u github.com/gobuffalo/pop \
&& go get -v -u github.com/gobuffalo/x/... \
&& go get -v -u github.com/mattn/go-sqlite3 \
&& go get -v -u github.com/markbates/filetest \
&& go get -v -u github.com/markbates/grift \
&& go get -v -u github.com/markbates/refresh \
&& go get -v -u github.com/gobuffalo/httptest \
&& go get -v -u github.com/gorilla/sessions \
&& go get -v -u golang.org/x/vgo
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
RUN npm i -g --no-progress yarn \
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
&& yarn config set yarn-offline-mirror-pruning true
RUN rm -rfv $BP && mkdir -p $BP
WORKDIR $BP
COPY . .
ENV GO111MODULE=on
RUN make deps && make install
ENV GO111MODULE=
RUN buffalo version
WORKDIR $GOPATH/src