-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Goss container image | ||
|
||
## Dockerfiles | ||
|
||
* [latest](https://github.com/goss-org/goss/blob/master/Dockerfile) | ||
|
||
## Using the base image | ||
|
||
This is a simple alpine image with Goss preinstalled on it. | ||
Can be used as a base image for your projects to allow for easy health checking. | ||
|
||
### Mount example | ||
|
||
Create the container | ||
|
||
```sh | ||
docker run --name goss ghcr.io/goss-org/goss goss | ||
``` | ||
|
||
Create your container and mount goss | ||
|
||
```sh | ||
docker run --rm -it --volumes-from goss --name weby nginx | ||
``` | ||
|
||
Run goss inside your container | ||
|
||
```sh | ||
docker exec weby /goss/goss autoadd nginx | ||
``` | ||
|
||
### HEALTHCHECK example | ||
|
||
```dockerfile | ||
FROM ghcr.io/goss-org/goss:latest | ||
|
||
COPY goss/ /goss/ | ||
HEALTHCHECK --interval=1s --timeout=6s CMD goss -g /goss/goss.yaml validate | ||
|
||
# your stuff.. | ||
``` | ||
|
||
### Startup delay example | ||
|
||
```dockerfile | ||
FROM ghcr.io/goss-org/goss:latest | ||
|
||
COPY goss/ /goss/ | ||
|
||
# Alternatively, the -r option can be set | ||
# using the GOSS_RETRY_TIMEOUT env variable | ||
CMD goss -g /goss/goss.yaml validate -r 5m && exec real_comand.. | ||
``` |