mudler / mudler/luet

Can't create repository following documentation example with (`--type docker`)

Open
#360 0 comments 0 reactions 1 assignee View on GitHub

@mudler is already working on this.

Since Jul 26, 2024.

bug
Dominant language
Go
Stars
307
Forks
30
PR merge metrics
No merged PRs in 30d

Description

Luet version:
luet version 0.35.2 (Build time: 2024-04-22 08:57:59 UTC)

CPU architecture, OS, and Version:
AMD64, inside a suse linux distrobox container (it may not be relevant)

Describe the bug
I try to run through the repository creation in https://luet.io/docs/concepts/overview/repositories/. Everything works as expected, but when I create-repo with the argument --type docker I get the following output:

INFO   Generating docker images for packages in /tmp/out
  ERROR    while building repository artifact index: while initializing repository generator: while pushing metadata file associated to the artifact: Failed generating metadata tree /tmp/out:foo-bar-0.1.metadata.yaml: while loading image: Failed loading image: invalid reference format
          : exit status 1

To Reproduce

mkdir package
cat <<EOF > package/build.yaml
image: busybox
steps:
- echo "foo" > /foo
EOF
cat <<EOF > package/definition.yaml
name: "foo"
version: "0.1"
category: "bar" # optional!
EOF
sudo luet build --all --destination $PWD/out/ --tree $PWD/package
sudo luet create-repo --name "test" --output $PWD/out --packages $PWD/out --tree $PWD/package --type docker

Expected behavior

I would expect the last command to run with no errors

Logs

here is the output by sudo luet create-repo --name "test" --output $PWD/out --packages $PWD/out --tree $PWD/package --type docker --debug:

 DEBUG   (config.go:#204:github.com/mudler/luet/cmd/util.initContext)  System rootfs: /
  DEBUG   (config.go:#205:github.com/mudler/luet/cmd/util.initContext)  Colors true
  DEBUG   (config.go:#206:github.com/mudler/luet/cmd/util.initContext)  Logging level info
  DEBUG   (config.go:#207:github.com/mudler/luet/cmd/util.initContext)  Debug mode true
 INFO   Generating docker images for packages in /tmp/out
  DEBUG   (repository_docker.go:#54:github.com/mudler/luet/pkg/installer.(*dockerRepositoryGenerator).Initialize.func1)  Skipping directories
  DEBUG   (repository_docker.go:#126:github.com/mudler/luet/pkg/installer.(*dockerRepositoryGenerator).pushFileFromArtifact)  Generating image /tmp/out:foo-bar-0.1.metadata.yaml
  DEBUG   (simpledocker.go:#76:github.com/mudler/luet/pkg/compiler/backend.(*SimpleDocker).LoadImage)  🐋  Loading image: /var/tmp/luet/tempimage4186696045
  ERROR    while building repository artifact index: while initializing repository generator: while pushing metadata file associated to the artifact: Failed generating metadata tree /tmp/out:foo-bar-0.1.metadata.yaml: while loading image: Failed loading image: invalid reference format
          : exit status 1

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.