Revert "Restored the CMD instruction to the Dockerfile and removed the CMD instruction explanation, this is a bit of a simplification but is a simplier explanation for a newbie"
This reverts commit 9e53ea71fa.
This commit is contained in:
parent
9e53ea71fa
commit
bd44be5fbd
|
|
@ -35,12 +35,14 @@ the build and runtime environment. In your `Dockerfile`, writing something along
|
||||||
the lines of the following will compile and run your project:
|
the lines of the following will compile and run your project:
|
||||||
|
|
||||||
FROM golang:1.3.1-onbuild
|
FROM golang:1.3.1-onbuild
|
||||||
CMD ["app"]
|
|
||||||
|
|
||||||
This image includes multiple `ONBUILD` triggers which should cover most
|
This image includes multiple `ONBUILD` triggers which should cover most
|
||||||
applications. The build will `COPY . /usr/src/app`, `RUN go get -d -v`, and `RUN
|
applications. The build will `COPY . /usr/src/app`, `RUN go get -d -v`, and `RUN
|
||||||
go install -v`.
|
go install -v`.
|
||||||
|
|
||||||
|
This image also includes the `CMD ["app"]` instruction which is the default command
|
||||||
|
when running the image.
|
||||||
|
|
||||||
You can then build and run the Docker image:
|
You can then build and run the Docker image:
|
||||||
|
|
||||||
docker build -t my-golang-app .
|
docker build -t my-golang-app .
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,14 @@ the build and runtime environment. In your `Dockerfile`, writing something along
|
||||||
the lines of the following will compile and run your project:
|
the lines of the following will compile and run your project:
|
||||||
|
|
||||||
FROM golang:1.3.1-onbuild
|
FROM golang:1.3.1-onbuild
|
||||||
CMD ["app"]
|
|
||||||
|
|
||||||
This image includes multiple `ONBUILD` triggers which should cover most
|
This image includes multiple `ONBUILD` triggers which should cover most
|
||||||
applications. The build will `COPY . /usr/src/app`, `RUN go get -d -v`, and `RUN
|
applications. The build will `COPY . /usr/src/app`, `RUN go get -d -v`, and `RUN
|
||||||
go install -v`.
|
go install -v`.
|
||||||
|
|
||||||
|
This image also includes the `CMD ["app"]` instruction which is the default command
|
||||||
|
when running the image.
|
||||||
|
|
||||||
You can then build and run the Docker image:
|
You can then build and run the Docker image:
|
||||||
|
|
||||||
docker build -t my-golang-app .
|
docker build -t my-golang-app .
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue