Run update.sh

This commit is contained in:
Docker Library Bot 2018-01-25 19:09:07 +00:00
parent 882251414e
commit 2238fb46a8
1 changed files with 3 additions and 5 deletions

View File

@ -116,10 +116,10 @@ FROM golang: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:
@ -129,8 +129,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: