Skip to content

serviceprototypinglab/dcvalidator

Repository files navigation

Docker Compose Validator

Idea

When we are using docker-compose, we may make silly mistakes. This tool helps you avoid making such mistakes!
For example:

version: '3'

services:
    app:
        build: .
        image: takacsmark/flask-redis:1.0
        environment:
          - FLASK_ENV=development
        ports:
          - "4999-5005:4999-5005"
    redis:
        image: redis:4.0.11-alpine

This is a docker-compose that works correctly! But imagine that you need more services. More services means complicated our docker-compose template! And at this point, human mistakes will probably show up! Say, we add more services, and at this point, we forgot that two of them share the same name, but THEY ARE NOT THE SAME SERVICE!
Simply I'll lose one of my services!

version: '3'

services:

  service1:
    /* Some stuff */

  service2:
    /* Some other stuff */
    
    
    ************ OTHER SERVICES ************
    
    service-n:
        /* Some stuff */
    
    service2:   <---------------- DUPLICATE SERVICE! ----------------
        /* Some stuff */    
    



Another example: Imagine you are new to docker-compose, and your template looks like this:

version: '3'

services:

  service1:
    /* Some stuff */

  service2:
    /* Some other stuff */
    
volumes:   <---------------- NOT IN A GOOD PLACE! ----------------
  db-data:


networks:
  something:
    external: true
    

Well this might happened to every newcomer with docker-compose!

This tool can analyze your docker-compose file with Github link or uploading the file.





**********************************************************************************************************

How to use it

Just go HERE and enjoy!

How to make it better

Make sure you have node.JS, npm, yarn, python 3, pip on your machine.
Then follow these steps:

  1. Download it as a zip file or clone it!
  2. Change your directory to the project directory
  3. yarn
  4. yarn install-client
  5. yarn install-server
  6. yarn dev
You are ready to go!

Can I contribute?

YES!
Feel free to add some features!

Note

This tool extends the label consistency checker which targets Docker Compose and Kubernetes/OpenShift YAML files. It emerged from research on microservice quality at Service Prototyping Lab, Zurich University of Applied Sciences.

About

Validation and quality check of Docker Compose files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published