-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Hello!
I want to build a pkg that runs lldpd (https://pkgs.alpinelinux.org/package/edge/community/x86/lldpd)
from the documentation, I added 'lldpd' to tools/alpine/packages and built my custom alpine image with make build, that created an image I can see in my local docker images:
linuxkit/alpine 89cad7757a4a4957f711437c93df5ac890bd30f7-arm64 455525acc948 17 minutes ago 1.79GB
I have created a lldpd folder in pkg/ , with its build.yml and created a Dockerfile with:
FROM linuxkit/alpine:89cad7757a4a4957f711437c93df5ac890bd30f7-arm64 AS mirror
RUN mkdir /out
RUN apk add --no-cache --initdb -p /out lldpd
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=mirror /out/ /
when I try to build my pkg image, it fails when trying to reference my custom base alpine image
linuxkit pkg build --hash 111 pkg/lldpd --force --platforms linux/arm64
Building "linuxkit/lldpd:111"
building docker.io/linuxkit/lldpd:111 for arches: arm64
Building for arch arm64 as docker.io/linuxkit/lldpd:111-arm64
using existing container linuxkit-builder
building for platform linux/arm64
[+] Building 0.8s (4/4) FINISHED
=> CACHED [internal] load remote build context 0.0s
=> CACHED copy /context / 0.0s
=> resolve image config for docker-image://docker.io/docker/buildkit-syft-scanner:stable-1 0.6s
=> ERROR [internal] load metadata for docker.io/linuxkit/alpine:89cad7757a4a4957f711437c93df5ac890bd30f7-arm64 0.2s
------
> [internal] load metadata for docker.io/linuxkit/alpine:89cad7757a4a4957f711437c93df5ac890bd30f7-arm64:
------
Error: error building "linuxkit/lldpd:111": error building for arch arm64: failed to solve: linuxkit/alpine:89cad7757a4a4957f711437c93df5ac890bd30f7-arm64: failed to resolve source metadata for docker.io/linuxkit/alpine:89cad7757a4a4957f711437c93df5ac890bd30f7-arm64: docker.io/linuxkit/alpine:89cad7757a4a4957f711437c93df5ac890bd30f7-arm64: not found
I understand that docker is trying to ge the image from docker.io, but I want to instead use my locally built alpine image,
if i run (inside pkg/lldpd) docker build ., the image is built as desired, but there is something going on between linuxkit and docker build causing the issue
thanks!