skaffold: Fail building with Azure Container Registry

I’m trying to use Skaffold together with Jib and a AKS Kubernetes cluster. However, it fails when building the image and Skaffold attempts to tag the image.

I guess that the issue is related to our private Azure Container Registry (ACR) and Docker authentication with it.

Expected behavior

skaffold build should build and push the image.

Actual behavior

Fails with the following log:

skaffold build -v debug
INFO[0000] Skaffold &{Version:v0.22.0 ConfigVersion:skaffold/v1beta4 GitVersion: GitCommit:2187105aae414f500789ca6873898efeb104d7a7 GitTreeState:clean BuildDate:2019-01-31T22:53:12Z GoVersion:go1.10.8 Compiler:gc Platform:linux/amd64} INFO[0000] no config entry found for kube-context devcluster INFO[0000] Using kubectl context: devcluster INFO[0000] no config entry found for kube-context devcluster DEBU[0000] Using builder: local DEBU[0000] setting Docker user agent to skaffold-v0.22.0 INFO[0000] no config entry found for kube-context devcluster DEBU[0000] push value not present, defaulting to true because localCluster is false Starting build… Building [acmeprivate.azurecr.io/blah/whatever/application]… DEBU[0000] Running docker build: context: api-app, dockerfile: Dockerfile DEBU[0000] Checking base image openjdk:8-jdk-alpine for ONBUILD triggers. DEBU[0000] Found dependencies for dockerfile: []
Sending build context to Docker daemon 116.1MB Step 1/5 : FROM openjdk:8-jdk-alpine —> 97bc1352afde Step 2/5 : VOLUME /tmp —> Using cache —> 82132c6ae10f Step 3/5 : ARG JAR_FILE —> Using cache —> 2d51bd6a9dae Step 4/5 : COPY ${JAR_FILE} /app.jar —> Using cache —> 86a498e654e4 Step 5/5 : ENTRYPOINT [“java”, “-Djava.security.egd=file:/dev/./urandom”, “-jar”, “/app.jar”, “–debug” ] —> Using cache —> 6aa1d7c6a9ae Successfully built 6aa1d7c6a9ab Successfully tagged 038039d9e8cca0fcac200a1e6841dc2a:latest DEBU[0000] Running command: [git rev-parse --short HEAD] DEBU[0000] Command output: [f386c81 ]
DEBU[0000] Running command: [git status . --porcelain]
DEBU[0000] Command output: [ M api-app/pom.xml ] DEBU[0000] attempting to add tag acmeprivate.azurecr.io/blah/whatever/application:f386c81-dirty-6aa1d7c to src acmeprivate.azurecr.io/blah/whatever/application@sha256:6aa1d7c6a9ae104c31ec217c5e845a79be00db5245d8033ec10ee2bc16a50563 FATA[0001] build failed: building [acmeprivate.azurecr.io/blah/whatever/application]: tagging: tagging image: getting image: unexpected end of JSON input

Information

  • Skaffold version: 0.22.0
  • Operating system: Fedora Core 29 (4.20.6-200.fc29.x86_64 x64)
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta4
kind: Config
build:
  artifacts:
  - image: acmeprivate.azurecr.io/blah/whatever/application
    jibMaven: {}
    context: api-app # Multi-module Maven project, api-app is the app module
    docker:
      dockerfile: Dockerfile

  local: {}

deploy:
  kubectl:
    manifests:
    - api-app/kubernetes/dev/*.yaml

I’ve installed the Docker credential helper for Azure Container Registry. After login az acr login (acmeprivate is the default registry) I can for example do docker pull acmeprivate.azurecr.io/blah/whatever/application so it appears to be working correctly.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 25 (14 by maintainers)

Most upvoted comments

@nkubala Actually this bug is a big issue for our company. Thus we stopped our research in how to implement Skaffold within our company.

Since we are a Azure oriented company this feature is very important to us and the fallback method (using native docker login) is not a very scalable and safe solution.

I’m going to try and use the latest version of google/go-containerregistry. However, it looks like it’s going to be a go modules hell.

I’ve tested with acr, without or without #3053 and the PR fixes the issue for me \o/. I’m going to close this issue. Feel free to reopen if the problem is not fixed for you.

bumping this one down in priority since we haven’t seen much activity on it in a few months so it might not be having as much impact as we thought originally, but still leaving it on our radar.