Avoid copy test to image

This commit is contained in:
jwang
2019-12-10 13:42:19 +00:00
committed by qzheng527
parent 18cb62eec0
commit 912af40d2c
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -36,8 +36,5 @@ ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
ENV CGO_LDFLAGS "-lopenblas"
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
COPY test $GOPATH/src/test
WORKDIR $GOPATH/src/test
RUN go mod init blas_test && go mod tidy
CMD ["go", "test", "-bench", "."]
WORKDIR /app
CMD ["go"]
+1 -1
View File
@@ -49,7 +49,7 @@ Docker Hub.
```
or specified app
```
docker run -it --rm -v "$PWD/app":/app -w /app clearlinux/gonum /bin/bash -c "go mod init app;go test -bench ."
docker run -it --rm -v "$PWD/test":/app -w /app clearlinux/gonum /bin/bash -c "go mod init app;go test -bench ."
```
<!-- Required -->