Skip to content
This repository was archived by the owner on May 4, 2026. It is now read-only.

tcwlab/legacy-dgoss

Repository files navigation

dgoss

FOSSA Status pipeline status coverage report GitHub tag License

tl;dr

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.

Quick reference

Getting started

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.yaml

First of all, you need a container image to test.

But in the following steps we only focus on the part of using tcwlab/dgoss.

Step 1: .gitlab-ci.yml

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>
  [...]

Step 2: Dockerfile

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.

Step 3: goss.yaml

In order to test our container image, we define what we want to have inside.

  • binary for goss is in place
  • script for dgoss is in place
  • goss -v returns the wanted version (in this example v0.3.16)
  • we expect dgoss to 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: false

Yep, that's it. If you don't believe me, have a look here.

Roadmap

If you are interested in the upcoming/planned features, ideas and milestones, please have a look at our board.

License

This project is licensed under Apache License v2.

Project status

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.

FOSSA Status

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors