Fix the build in Docker after enabling go modules
Enabling go modules requires that GO111MODULE is set, so we set it as an environment variable in the Dockerfile. Also, go-bindata is meant to be installed globally, so we force the install before enabling Go modules. Also, we update Go to 1.12 to fix a couple module builds.
This commit is contained in:
parent
7a07e1009b
commit
402e9e822c
@ -1,13 +1,15 @@
|
|||||||
# Build image
|
# Build image
|
||||||
FROM golang:1.11.2-alpine3.8 as build
|
FROM golang:1.12-alpine as build
|
||||||
|
|
||||||
RUN apk add --update nodejs nodejs-npm make g++ git sqlite-dev
|
RUN apk add --update nodejs nodejs-npm make g++ git sqlite-dev
|
||||||
RUN npm install -g less less-plugin-clean-css
|
RUN npm install -g less less-plugin-clean-css
|
||||||
|
RUN go get -u github.com/jteeuwen/go-bindata/...
|
||||||
|
|
||||||
RUN mkdir -p /go/src/github.com/writeas/writefreely
|
RUN mkdir -p /go/src/github.com/writeas/writefreely
|
||||||
WORKDIR /go/src/github.com/writeas/writefreely
|
WORKDIR /go/src/github.com/writeas/writefreely
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ENV GO111MODULE=on
|
||||||
RUN make build \
|
RUN make build \
|
||||||
&& make ui
|
&& make ui
|
||||||
RUN mkdir /stage && \
|
RUN mkdir /stage && \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user