forked from gobuffalo/buffalo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.slim.build
46 lines (35 loc) · 1.53 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
45
46
FROM golang:alpine
EXPOSE 3000
ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo
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 -u github.com/golang/dep/cmd/dep \
&& go get -v -u github.com/gobuffalo/makr \
&& go get -v -u github.com/gobuffalo/packr \
&& 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/inflect \
&& 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 \
&& go get -u github.com/alecthomas/gometalinter \
&& gometalinter --install
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 . .
RUN make deps && make install
# cache yarn packages to an offline mirror so they're faster to load. hopefully.
RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json \
&& yarn install --no-progress
RUN buffalo version
WORKDIR $GOPATH/src
RUN ls -la /npm-packages-offline-cache