fixing olympus dockerfile (#186)

* fixing olympus dockerfile

* adding olympus docker build target

* cleaning up dockerfile
This commit is contained in:
Aaron Schlesinger
2018-06-20 13:54:11 -07:00
committed by GitHub
parent 5765224b31
commit 312da56044
2 changed files with 10 additions and 10 deletions
+3
View File
@@ -13,3 +13,6 @@ docs:
test:
cd cmd/proxy && buffalo test
cd cmd/olympus && buffalo test
olympus-docker:
docker build -t gopackages/olympus -f cmd/olympus/Dockerfile .
+7 -10
View File
@@ -1,19 +1,16 @@
# This is a multi-stage Dockerfile and requires >= Docker 17.05
# https://docs.docker.com/engine/userguide/eng-image/multistage-build/
#
# use 'make olympus-docker' from the root of the athens repo to build
# the olympus docker image
FROM gobuffalo/buffalo:v0.11.0 as builder
RUN mkdir -p $GOPATH/src/github.com/gomods/athens/cmd/olympus
RUN mkdir -p $GOPATH/src/github.com/gomods/athens
WORKDIR $GOPATH/src/github.com/gomods/athens
ADD . .
WORKDIR $GOPATH/src/github.com/gomods/athens/cmd/olympus
# this will cache the npm install step, unless package.json changes
ADD cmd/olympus/package.json .
ADD cmd/olympus/yarn.lock .
RUN yarn install --no-progress
WORKDIR $GOPATH/src/github.com/gomods/athens
ADD . .
RUN cd cmd/olympus && buffalo build -s -o /bin/app
RUN buffalo build -s -o /bin/app
FROM alpine
RUN apk add --no-cache bash