Skip to content

Commit

Permalink
docs: Update and more general wording for "docker container" (#934)
Browse files Browse the repository at this point in the history
* docs: Update and more general wording for "docker container"

* revert one change

* revert one change at README.md

* revert changes at dcgoss

* revert again
  • Loading branch information
dklimpel authored Jul 3, 2024
1 parent c9e7b54 commit b8ff782
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://asciinema.org/a/4suhr8p42qcn6r7crfzt6cc3e?autoplay=1" target="_blank"><img src="https://cloud.githubusercontent.com/assets/6783261/17330426/ce7ad066-5894-11e6-84ea-29fd4207af58.gif" alt="asciicast"></a>
<!-- markdownlint-enable line-length no-inline-html -->

**Note:** For testing docker containers see the [dgoss](https://github.com/goss-org/goss/tree/master/extras/dgoss) wrapper.
**Note:** For testing containers see the [dgoss](https://github.com/goss-org/goss/tree/master/extras/dgoss) wrapper.
Also, user submitted wrapper scripts for Kubernetes [kgoss](https://github.com/goss-org/goss/tree/master/extras/kgoss)
and Docker Compose [dcgoss](https://github.com/goss-org/goss/tree/master/extras/dcgoss).

Expand Down
23 changes: 12 additions & 11 deletions extras/dgoss/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# dgoss

dgoss is a convenience wrapper around goss that aims to bring the simplicity of goss to docker containers.
dgoss is a convenience wrapper around goss that aims to bring the simplicity of goss to containers.

## Examples and Tutorials

* [blog tutorial](https://medium.com/@aelsabbahy/tutorial-how-to-test-your-docker-image-in-half-a-second-bbd13e06a4a9) -
Introduction to dgoss tutorial
* [video tutorial](https://youtu.be/PEHz5EnZ-FM) - Same as above, but in video format
* [dgoss-examples](https://github.com/aelsabbahy/dgoss-examples) - Repo containing examples of using dgoss to validate
docker images
container images

## Installation

Expand Down Expand Up @@ -45,9 +45,10 @@ dgoss run ...

### Run

Run is used to validate a docker container.
Run is used to validate a container.
It expects a `./goss.yaml` file to exist in the directory it was invoked from.
In most cases one can just substitute the docker command for the dgoss command, for example:
In most cases one can just substitute the runtime command (`docker` or `podman`)
for the dgoss command, for example:

**run:**

Expand All @@ -61,13 +62,13 @@ In most cases one can just substitute the docker command for the dgoss command,

* Run the container with the flags you specified.
* Stream the containers log output into the container as `/goss/docker_output.log`
* This allows writing tests or waits against the docker output
* This allows writing tests or waits against the container output
* (optional) Run `goss` with `$GOSS_WAIT_OPTS` if `./goss_wait.yaml` file exists in the current dir
* Run `goss` with `$GOSS_OPTS` using `./goss.yaml`

### Edit

Edit will launch a docker container, install goss, and drop the user into an interactive shell.
Edit will launch a container, install goss, and drop the user into an interactive shell.
Once the user quits the interactive shell, any `goss.yaml` or `goss_wait.yaml` are copied out into the current directory.
This allows the user to leverage the `goss add|autoadd` commands to write tests as they would on a regular machine.

Expand Down Expand Up @@ -117,18 +118,18 @@ directory `DGOSS_TEMP_DIR`. (Default: `''`)
#### GOSS_VARS

The name of the variables file relative to `GOSS_FILES_PATH` to copy into the
docker container and use for valiation (i.e. `dgoss run`) and copy out of the
docker container when writing tests (i.e. `dgoss edit`). If set, the
container and use for valiation (i.e. `dgoss run`) and copy out of the
container when writing tests (i.e. `dgoss edit`). If set, the
`--vars` flag is passed to `goss validate` commands inside the container.
If unset (or empty), the `--vars` flag is omitted, which is the normal behavior.
(Default: `''`).

#### GOSS_FILES_STRATEGY

Strategy used for copying goss files into the docker container. If set to `'mount'` a volume with goss files is mounted
Strategy used for copying goss files into the container. If set to `'mount'` a volume with goss files is mounted
and log output is streamed into the container as `/goss/docker_output.log` file. Other strategy is `'cp'` which uses
`'docker cp'` command to copy goss files into docker container. With the `'cp'` strategy you lose the ability to write
tests or waits against the docker output. The `'cp'` strategy is required especially when docker daemon is not on the
`'docker cp'` command to copy goss files into container. With the `'cp'` strategy you lose the ability to write
tests or waits against the container output. The `'cp'` strategy is required especially when container daemon is not on the
local machine.
(Default `'mount'`)

Expand Down
4 changes: 2 additions & 2 deletions extras/kgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ To find `goss.yaml` in another directory specify that directory's path in `GOSS_

### Run

The `run` command is used to validate a docker container. It expects a
The `run` command is used to validate a container. It expects a
`./goss.yaml` file to exist in the directory it was invoked from.

**Example:**
Expand All @@ -111,7 +111,7 @@ The `run` command is used to validate a docker container. It expects a

### Edit

Edit will launch a docker container, install goss, and drop the user into an
Edit will launch a container, install goss, and drop the user into an
interactive shell. Once the user quits the interactive shell, any `goss.yaml`
or `goss_wait.yaml` are copied out into the current directory. This allows the
user to leverage the `goss add|autoadd` commands to write tests as they would
Expand Down

0 comments on commit b8ff782

Please sign in to comment.