Skip to content

Latest commit

 

History

History
194 lines (157 loc) · 3.24 KB

UPGRADING-5.1.md

File metadata and controls

194 lines (157 loc) · 3.24 KB

Upgrade guide: 5.0 -> 5.1

  1. The dockerFile and dockerAlfresco configuration blocks have been deprecated and have been consolidated to one configuration block.

    Old New
    dockerFile {
       dockerBuild {
           [...]
       }
    }
    dockerBuild {
       [...]
    }
    dockerAlfresco {
       baseImage = "..."
       leanImage = true
       dockerBuild {
           [...]
       }
    }
    dockerBuild {
       [...]
       alfresco {
           baseImage = "..."
           leanImage = true
       }       
    }
  2. dockerBuild.repository has been renamed to dockerBuild.repositories and supports tagging an image with multiple repositories at once.

    Old New
    ```groovy
    dockerFile {
        dockerBuild {
            repository = "some-repository/image-name"
            tags = ["some", "tags"]
        }
    }
    ```
     ```groovy
     dockerBuild {
         repositories = ["some-repository/image-name"]
         tags = ["some", "tags"]
     }
     ```
  3. pull, noCache and remove properties on the dockerBuild extension are deprecated. They can be set directly on the buildDockerImage task.

    Old New
    ```groovy
    dockerFile {
        dockerBuild {
             pull = false
             noCache = true
             remove = false
        }
    }
    ```
     ```groovy
     buildDockerImage {
         pull = false
         noCache = true
         remove = false
     }
     ```
  4. Automatic tagging been deprecated. You can use autotag.legacyTags() to keep using same tagging functionality.

    Old New
    ```groovy
    dockerAlfresco {
        dockerBuild {
            automaticTags = true
            tags = ["some", "tags"]
        }
    }
    ```
     ```groovy
     dockerBuild {
         tags = autotag.legacyTags(["some", "tags"])
     }
     ```
  5. The eu.xenit.docker plugin now creates a createDockerFile task, so you don't have to create one manually anymore. As long as no Dockerfile is present in the project directory, it will automatically be used by buildDockerImage.

    Old New
    ```groovy
    task createDockerFile(type: DockerfileWithCopyTask) {
         [...]
    }
    ```
     ```groovy
     createDockerFile {
         [...]
     }
     ```