mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Cleanup Dockerfiles (#437)
* Cleanup Dockerfiles * Responding to review feedback * Preventing host copy of local and directories from being copied into builder containers.
This commit is contained in:
committed by
Aaron Schlesinger
parent
5f02ada292
commit
106d8c3631
@@ -0,0 +1,2 @@
|
||||
**/node_modules/
|
||||
**/bin/
|
||||
@@ -35,14 +35,16 @@ test-unit:
|
||||
test-e2e:
|
||||
./scripts/test_e2e.sh
|
||||
|
||||
.PHONY: docker
|
||||
docker: olympus-docker proxy-docker
|
||||
|
||||
.PHONY: olympus-docker
|
||||
olympus-docker:
|
||||
docker build -t gomods/olympus -f cmd/olympus/Dockerfile .
|
||||
|
||||
.PHONY: proxy-docker
|
||||
proxy-docker:
|
||||
# TODO: this needs to change to gomods/proxy
|
||||
docker build -t gomods/athens -f cmd/proxy/Dockerfile .
|
||||
docker build -t gomods/proxy -f cmd/proxy/Dockerfile .
|
||||
|
||||
bench:
|
||||
./scripts/benchmark.sh
|
||||
|
||||
+10
-4
@@ -5,12 +5,18 @@
|
||||
# the olympus docker image
|
||||
FROM gobuffalo/buffalo:v0.11.0 as builder
|
||||
|
||||
RUN mkdir -p $GOPATH/src/github.com/gomods/athens
|
||||
WORKDIR $GOPATH/src/github.com/gomods/athens
|
||||
ADD . .
|
||||
RUN mkdir -p $GOPATH/src/github.com/gomods/athens/cmd/olympus
|
||||
WORKDIR $GOPATH/src/github.com/gomods/athens/cmd/olympus
|
||||
|
||||
RUN buffalo build -s -o /bin/app
|
||||
# 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
|
||||
|
||||
FROM alpine
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
Reference in New Issue
Block a user