mcmah309 / containeryard

ContainerYard is a declarative, reproducible, and reusable decentralized approach for defining containers.
Apache License 2.0
52 stars 1 forks source link

Allow More Module Configurations #21

Open mcmah309 opened 1 week ago

mcmah309 commented 1 week ago

More module configurations besides just Containerfile and yard-module.yaml in the same directrory. To accomplish this, we should change the resolution strategy. e.g. pseudo code

if is_file() {
  if file_is_containerfile() { // "Dockerfile", "Containerfile", "*.Containerfile", "*.Dockerfile", "Containerfile.*", "Dockerfile.*" // case does not matter
    // module is just a containerfile
  }
  // Try parse as single file format
}
else if is_directory() {
  let config = get_module_config();
  if let Some(containerfile_location) = config.containerfile_location {
     // module info found
  }
  // Try to find module info in "Containerfile" then "Dockerfile"
}

Combines: