Azure / Azure/acr-builder

az acr build fails on creating a symlink

Open
#633 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
41
Forks
45
Avg merge
6h 52m
Merged PRs (30d)
5

Description

**Describe the bug**
`az acr build` fails to build image on creating symlink with `No such file or directory`. Builing the same image with `docker build` is successful.

**To Reproduce**
Steps to reproduce the behavior:
1. Create Dockerfile with contents:
```Dockerfile
FROM splunk/universalforwarder:8.2

USER root

RUN mkdir -p /opt/splunkforwarder/var/log/splunk
RUN mkdir -p /opt/splunkforwarder/var/log/tmp
RUN ln -sf /opt/splunkforwarder/var/log/splunk /opt/splunkforwarder/var/log/tmp

ENTRYPOINT ["/bin/bash"]
```
2. Run `az acr build`

It seems that workaround with `RUN mkdir -p /opt/splunkforwarder/var/log/tmp && ln -sf /opt/splunkforwarder/var/log/splunk /opt/splunkforwarder/var/log/tmp` works.

**Expected behavior**
Image is successfully built using `az acr build`

**Any relevant environment information**
- OS: MacOS Monterey 12.5
- Version: azure-cli 2.40

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.