This image is used to validate that a container is behaving and working as expected.
As this project is just wrapping the goss and dgoss tools, you will not find
much details about the usage of these tools, but only how to use this image.
- Maintained by: Sascha Willomitzer (of the TCWlab project)
- Where to get help: file an issue
- Supported architectures: linux/amd64
- Published image artifact details: see source code repository
- Documentation: For
gossanddgossyou can find some explanations in the original project
This docker image is intended to be used as a part of a CI/CD pipeline. It is based on the official Docker library image and the great work of aelsabbahy and his GOSS tool.
As we only use this image as part of our GitLab pipelines, this is the configuration you could use.
The folder structure is very lean:
.
├── .gitlab-ci.yml
├── Dockerfile
├── goss
│ └── goss.yamlFirst of all, you need a container image to test.
But in the following steps we only focus on
the part of using tcwlab/dgoss.
For a full working example, please have a look at this working solution.
This is a snippet for your .gitlab-ci.yml:
[...]
validate-image:
stage: test
# For this example we stick to the :latest tag
image: tcwlab/dgoss:latest
variables:
# Path to the goss.yaml file in your repository
GOSS_FILES_PATH: goss
# Strategy to fix issues on some platforms
GOSS_FILES_STRATEGY: cp
script:
- dgoss run -it <YOUR_CONTAINER_IMAGE>
[...]As this Getting Started Guide is not taking care of multistage builds, etc. we start as lean as we can:
FROM tcwlab/dgoss:latest
RUN echo "hello from inside"If you want to see a real world example, please have a look here.
In order to test our container image, we define what we want to have inside.
- binary for
gossis in place - script for
dgossis in place goss -vreturns the wanted version (in this example v0.3.16)- we expect
dgossto run on a error, but want to see the usage information.
file:
/usr/bin/goss:
exists: true
filetype: file
/usr/bin/dgoss:
exists: true
filetype: file
command:
goss:
exit-status: 0
exec: "goss -v"
stdout:
- goss version v0.3.16
stderr: []
timeout: 10000 # in milliseconds
skip: false
dgoss:
exit-status: 1
exec: "dgoss"
stdout: []
stderr:
- USAGE
timeout: 10000 # in milliseconds
skip: falseYep, that's it. If you don't believe me, have a look here.
If you are interested in the upcoming/planned features, ideas and milestones, please have a look at our board.
This project is licensed under Apache License v2.
This project is maintained "best effort", which means, we strive for automation as much as we can A lot of updates will be done "automagically".
We do not have a specific dedicated set of people to work on this project.
It absolutely comes with no warranty.