Error following Quickstart - Package and deploy your service

Hi,

I have followed the example in the Quickstart but I do get:

[error] #1 [internal] load build definition from Dockerfile
[error] #1 transferring dockerfile: 1.09kB done
[error] #1 DONE 0.0s
[error] #2 [internal] load .dockerignore
[error] #2 transferring context: 2B done
[error] #2 DONE 0.0s
[error] #3 [internal] load metadata for docker.io/library/adoptopenjdk:11-jre-hotspot
[error] #3 ...
[error] #4 [auth] library/adoptopenjdk:pull token for registry-1.docker.io
[error] #4 DONE 0.0s
[error] #3 [internal] load metadata for docker.io/library/adoptopenjdk:11-jre-hotspot
[error] #3 DONE 3.9s
[error] #5 [stage0 1/7] FROM docker.io/library/adoptopenjdk:11-jre-hotspot@sha256:ad6431b2e2a6f8016aa6d79c3f588783af9fdc06cafe131fd0d3faf560914b13
[error] #5 DONE 0.0s
[error] #6 [internal] load build context
[error] #6 transferring context: 1.55MB 0.0s done
[error] #6 DONE 0.0s
[error] #7 [stage0 2/7] WORKDIR /opt/docker
[error] #7 CACHED
[error] #8 [stage0 3/7] COPY 1/opt /1/opt
[error] #8 DONE 0.1s
[error] #9 [stage0 4/7] COPY 2/opt /2/opt
[error] #9 DONE 0.0s
[error] #10 [stage0 5/7] RUN ["chmod", "-R", "u=rX,g=rX", "/1/opt/docker"]
[error] #10 DONE 0.3s
[error] #11 [stage0 6/7] RUN ["chmod", "-R", "u=rX,g=rX", "/2/opt/docker"]
[error] #11 DONE 0.3s
[error] #12 [stage0 7/7] RUN ["chmod", "u+x,g+x", "/1/opt/docker/bin/customer-registry"]
[error] #12 DONE 0.3s
[error] #13 [mainstage 2/5] RUN id -u demiourgos728 1>/dev/null 2>&1 || (( getent group 0 1>/dev/null 2>&1 || ( type groupadd 1>/dev/null 2>&1 && groupadd -g 0 root || addgroup -g 0 -S root )) && ( type useradd 1>/dev/null 2>&1 && useradd --system --create-home --uid 1001 --gid 0 demiourgos728 || adduser -S -u 1001 -G root demiourgos728 ))
[error] #13 CACHED
[error] #14 [mainstage 3/5] WORKDIR /opt/docker
[error] #14 CACHED
[error] #15 [mainstage 4/5] COPY --from=stage0 --chown=demiourgos728:root /1/opt/docker /opt/docker
[error] #15 DONE 0.1s
[error] #16 [mainstage 5/5] COPY --from=stage0 --chown=demiourgos728:root /2/opt/docker /opt/docker
[error] #16 DONE 0.0s
[error] #17 exporting to image
[error] #17 exporting layers 0.1s done
[error] #17 writing image sha256:c47c4a14eba6d37b1dfaeb132d4dbde43b44d9bc10cc4a4b25d9663e89049ff9 done
[error] #17 naming to docker.io/library/customer-registry:HEAD-20221114-1216 done
[error] #17 naming to docker.io/library/customer-registry:latest done
[error] #17 DONE 0.1s
[info] Removing intermediate image(s) (labeled "snp-multi-stage-id=8e1857f7-59cb-4635-a730-52c950caf046") 
[info] Total reclaimed space: 0B
[info] Built image customer-registry with tags [HEAD-20221114-1216, latest]

When I tried the Package and deploy your service section. I am logged into my docker hub as I am able to push the broken image. I am on Apple M1, sbt 1.7.2, openjdk version “17.0.2” 2022-01-18, Scala 2.13.8. Thanks for your help.

Hi @wpoosanguansit

Sorry to hear you are having problems. Which of the quickstarts are you using, is it the scala-customer-registry? What is the exact command you use to deploy?

The output does look a bit suspicious with the docker hub username being library are you sure you succeeded in pushing the image?

FYI Kalix only supports deploying amd64 images so we have some logic in the sample build.sbt to detect M1/aarch64 and cross build that with docker buildx.

Thank you for your help, Johan. Yes, I am going through scala-customer-registry example. I used the command:

sbt Docker/publish -Ddocker.username=[your-docker-hub-username]

I checked on my docker hub and the image was pushed there successfully. I could see the image. I don’t think I set the user to library anywhere. So I am not sure what I can set or change in this case.

Thanks for your help.

But you can see that the image is in fact aarch64 and not a cross built amd64 from the docker hub gui or is it showing when you try to kalix service deploy it?

Strangely, I am able to deploy and run the service now even with the errors. So I am not even sure what was the error then when I couldn’t run the image.