# Azure-acr and docker\_layer\_cache

**URL:** <https://discuss.circleci.com/t/azure-acr-and-docker-layer-cache/39537>\
**Category:** Build Environment\
**Created:** [March 24, 2021, 10:55pm UTC](https://discuss.circleci.com/t/azure-acr-and-docker-layer-cache/39537 "2021-03-24T22:55:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonrial](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/gonrial/32/27008_2.png) [@gonrial](https://discuss.circleci.com/u/gonrial)\
**Post date:** [March 24, 2021, 10:55pm UTC](https://discuss.circleci.com/t/azure-acr-and-docker-layer-cache/39537/1 "2021-03-24T22:55:45Z")

</div>

I would like to take advantage of the docker\_layer\_cache while building a docker image using azure-acr/build-and-push-image task.

In the example looks something like this:

```
orbs:
   azure-acr: circleci/azure-acr@x.y.z
   version: 2.1
   workflows:
    build-and-publish-docker-image:
      jobs:
        - azure-acr/build-and-push-image:
          login-server-name: exampleregistry.azurecr.io
          registry-name: exampleregistry
          repo: example-repository
          tag: $CIRCLE_TAG

```

But deep into the documentation it is stated that you can set a `dlc` parameter to enable the docker\_layer\_cache, but there is no example on how to setup it.

The documentation states ([CircleCI Developer Hub - circleci/azure-acr](https://circleci.com/developer/orbs/orb/circleci/azure-acr#orb-source) Line 201)

```
executors:
   default:
     description: |
       CircleCI's Ubuntu-based machine executor VM: https://circleci.com/docs/2.0/executor-types/#using-machine
     machine:
       docker_layer_caching: <<parameters.dlc>>
       image: <<parameters.image>>
     parameters:
       dlc:
         default: false
         description: Enable Docker Layer Caching?
         type: boolean
       image:
         default: ubuntu-1604:201903-01
         type: string

```

I tried different approaches and this is the only one that is valid but still does not enable DLC feature:

```
executors:
  default:
    machine:
      docker_layer_caching: true

```

What am I missing or how can I improve to enable docker layer cache?
