Fix typo in Java guide for running tests (#21816)

## Description

Fix typo when targeting the `test` stage - it was mentioning a
non-exisiting `--target-test` parameter which could confuse new users:
`unknown flag: --target-test`.
It should be `--target test` or `--target=test`. I went with `--target
test` since that's what is used in the rest of the guide.


## Related issues or tickets

Introduced in https://github.com/docker/docs/pull/19390

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [ ] Editorial review
- [ ] Product review
This commit is contained in:
Igor Klimer 2025-01-14 22:54:01 +00:00 committed by GitHub
parent 941957c85f
commit f42a4ccabe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ fail if the tests fail.
Finally, you updated the deps stage to be based on the base stage and removed
the instructions that are now in the base stage.
Run the following command to build a new image using the test stage as the target and view the test results. Include `--progress=plain` to view the build output, `--no-cache` to ensure the tests always run, and `--target-test` to target the test stage.
Run the following command to build a new image using the test stage as the target and view the test results. Include `--progress=plain` to view the build output, `--no-cache` to ensure the tests always run, and `--target test` to target the test stage.
Now, build your image and run your tests. You'll run the `docker build` command and add the `--target test` flag so that you specifically run the test build stage.