Giter Club home page Giter Club logo

docker-bakery's People

Contributors

gmiejski avatar jaroslaw-bochniak avatar kasinskim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-bakery's Issues

Custom property in image name breaks hierarchy determination

Hey,

for my use case I'm including the current branch name within the generated image name. So I use something like FROM {{.DEFAULT_PULL_REGISTRY}}/base/{{.BRANCH}}:{{.BASE_VERSION}} in child images (Full minimal testcase). When determining the hierarchy, this property does not seem to be evaluated properly:

$ docker-bakery build -s major -c config.json -d base/Dockerfile.template -p BRANCH=master

Dockerfiles hierarchy discovered in .
├── scratch
│   └── base
└── {{.BRANCH}}
    └── child

As a result, only base gets build, because child is not being determined as a child of base.

Image names containing hierarchy

We are interested in using this tool for our internal use case. However, we found one thing that we would like to have in a different way. Currently, the folder name where the Dockerfile.template is located is used as the IMAGE_NAME. Let me explain it using your example repo. You have the following structure:

├── alpine-java
│   ├── bird (latest: 0.0.1)
│   └── mammal (latest: 3.2.5)
│       ├── cat (latest: 5.0.4)
│       ├── dog (latest: 5.0.4)
│       │   ├── dobermann (latest: 4.0.4)
│       │   │   └── smaller-dobermann (latest: 4.0.4)
│       │   ├── pitbull (latest: 3.0.4)
│       │   └── labrador (latest: 9.0.4)
│       └── horse (latest: 3.2.4)
└── scratch
    └── fish (latest: 1.0.0)

Right now all the images have the following name structure: {{.DEFAULT_PULL_REGISTRY}}/<name>:<version>. However, we want a nested structure, an example for dobermann would be: {{.DEFAULT_PULL_REGISTRY}}/mammal/dog/dobermann:<version>. I think this solution is more verbose than having to define folder names like mammal-dog-dobermann to achieve something similar. As well, if 2 directories have the same name but different parents, the current approach would cause issues.

Is this something you could add support to? Or is this project not maintained anymore?

If this is something you would accept I can create a pull request for it

List all images and build only the ones that changed

Hi!

I am trying to use docker-bakery in my CI/CD pipelines. The goal is to, whenever someone merges to master, build only the images that changed, and their children, avoiding building the children twice if both the parent and the children changed.

This is easy locally, because you know which files you edited, so you just go to those and run the build command. In the CI/CD (I'm using Gitlab), I can list all the Docker.template files that changed since the last merge, but I still need to find a way to avoid building parent and child if both changed. My idea was to use the show-structure command and filter using that, but the output is very difficult to parse. I think adding a json output option would be very useful.

I also tried using the images' digests to detect if something changed or not, but those change every time, even if the image is exactly the same, I think this happens because of the BAKERY_BUILD_DATE env variable that changes every time automatically.

I am also open to suggestions as to how automate this. Maybe I am just doing everything wrong! 😄

Thank you in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.