docker-suite / goss

A docker image for testing docker containers with goss, dgoss and dcgoss.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goss

Build Status License: MIT

Goss is a YAML based serverspec alternative tool for validating a server’s configuration. It eases the process of writing tests by allowing the user to generate tests from the current system state. Once the test suite is written they can be executed, waited-on, or served as a health endpoint.

Usage:

Setup:

# cd into the directory with your Dockerfile and build your image.
docker build -t MyApp .

Create tests:

# This is an example for a docker image named MyApp:
docker run --rm -it \
    -v "$(pwd)":/goss \
	-v /tmp:/tmp \
    -v /var/run/docker.sock:/var/run/docker.sock \
    dsuite/goss dgoss edit MyApp

goss a process MyApp
goss a user root
goss a user user2
goss a file /dir
goss a file /dir/file
goss a http http://localhost:8080
exit

# this will generate a goss.yaml file in your current folder.

See the Goss manual for more details

Run tests:

docker run --rm -it \
    -v "$(pwd)":/goss \
	-v /tmp:/tmp \
    -v /var/run/docker.sock:/var/run/docker.sock \
    dsuite/goss dgoss run MyApp

More examples:

Whant to see goss in action, visit goss-examples

About

A docker image for testing docker containers with goss, dgoss and dcgoss.

License:MIT License


Languages

Language:Shell 51.5%Language:Dockerfile 25.1%Language:Makefile 23.4%