- Add missing code-hints (console, yaml)
- Consistently add an empty line after code-blocks
- Combine some examples where the output and the command were
put in separate blocks. With the "console" code-hint, this
is no longer nescessary.
- fix indentation in cloud/ecs-integration.md, which caused the
numbered-list to be interrupted.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* add explicit instruction to stop local server
This relates to the [Test the application section of the Build images tutorial](https://docs.docker.com/language/nodejs/build-images/#test-the-application).
In this section, `node server.js` is used to start the server locally. The reader is not instructed to stop the server.
In the [Run containers](https://docs.docker.com/language/nodejs/run-containers/) tutorial that follows this one, the reader is instructed to start up the container, and try to access `http://localhost:8000/test` which is now being served from the Node.js process inside the container. However, if the local Node.js process from the `node server.js` invocation earlier, they won't see the "Failed to connect to localhost port 8000" error which they're supposed to see.
So this modification adds an explicit instruction to the "Build containers" tutorial to stop the `node server.js` process, to avoid any potential confusion in the "Run containers" tutorial.
Great tutorials, btw!
* show what happens with Ctrl-c
add suggestions from @thaJeztah, plus the same language identifier on the triple-backtick quoted output earlier (`console`).
* Minor styling updates
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
* Update build-images.md
Small typos in the documentation, which may lead to confusion.
* Inspiration from node.js docs
Added documentation for why we copy `package*.json` before copying the whole directory. Checkout: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/#creating-a-dockerfile.
The node.js docs has more optimized code too (using `npm ci` instead of `npm install`) which can be used here too.
* Fixed review provided and removed some weird whitespaces
When copying files to a destination directory, the classic builder requires
the destination to have a trailing slash (to indicate the target is a _directory_.
not a filename). BuildKit is a bit more flexible in this, and will assume the
target is a directory, but users following the example with buildkit disabled
might see an error message, e.g.:
Sending build context to Docker daemon 3.072kB
Step 1/2 : FROM busybox
---> 69593048aa3a
Step 2/2 : COPY *.go .
When using COPY with more than one source file, the destination must be a directory and end with a /
It doesn't hurt to be explicit, so this patch updates some examples to prevent
this.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>