Vendor modules before building docker image so private modules can be downloaded

This commit is contained in:
Cody Soyland 2019-12-20 16:05:18 -06:00
parent 47316d9f2f
commit d4117f3137
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ ARG MAKE_FLAGS
COPY . pilosa
RUN cd pilosa && CGO_ENABLED=0 make install FLAGS="-a ${BUILD_FLAGS}" ${MAKE_FLAGS}
RUN cd pilosa && CGO_ENABLED=0 make install FLAGS="-a -mod=vendor ${BUILD_FLAGS}" ${MAKE_FLAGS}
FROM alpine:3.9.4

View file

@ -131,12 +131,12 @@ generate-proto-grpc: require-protoc require-protoc-gen-gofast
generate: generate-protoc generate-stringer generate-pql
# Create Docker image from Dockerfile
docker:
docker: vendor
docker build --build-arg BUILD_FLAGS="${FLAGS}" -t "pilosa:$(VERSION)" .
@echo Created docker image: pilosa:$(VERSION)
# Create Docker image from Dockerfile (enterprise)
docker-enterprise:
docker-enterprise: vendor
docker build --build-arg MAKE_FLAGS="ENTERPRISE=1" -t "pilosa-enterprise:$(VERSION)" .
@echo Created docker image: pilosa-enterprise:$(VERSION)