mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-08-26 18:35:58 +00:00
Avoid copy test to image
This commit is contained in:
+2
-5
@@ -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
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user