Remove all reference to deprecated "go-wrapper" script

This commit is contained in:
Tianon Gravi 2018-01-25 10:48:07 -08:00
parent f27ac92eb0
commit e19ba52efe
1 changed files with 3 additions and 5 deletions

View File

@ -18,10 +18,10 @@ FROM %%IMAGE%%:1.8
WORKDIR /go/src/app
COPY . .
RUN go-wrapper download # "go get -d -v ./..."
RUN go-wrapper install # "go install -v ./..."
RUN go get -d -v ./...
RUN go install -v ./...
CMD ["go-wrapper", "run"] # ["app"]
CMD ["app"]
```
You can then build and run the Docker image:
@ -31,8 +31,6 @@ $ docker build -t my-golang-app .
$ docker run -it --rm --name my-running-app my-golang-app
```
*Note:* `go-wrapper run` includes `set -x` so the binary name is printed to stderr on application startup. If this behavior is undesirable, then switching to `CMD ["app"]` (or `CMD ["myapp"]` if a [Go custom import path](https://golang.org/s/go14customimport) is in use) will silence it by running the built binary directly.
## Compile your app inside the Docker container
There may be occasions where it is not appropriate to run your app inside a container. To compile, but not run your app inside the Docker instance, you can write something like: