Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #944

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update README.md #944

wants to merge 1 commit into from

Conversation

lalyos
Copy link

@lalyos lalyos commented Nov 6, 2023

when using apko via docker, the provided samples fail with the following error:

$ docker run -v "$PWD":/work cgr.dev/chainguard/apko build examples/alpine-base.yaml apko-alpine:test apko-alpine.tar

ℹ️            | loading config file: alpine-base.yaml
⚠️            | remote configurations are an experimental feature and subject to change.
Error: failed to load image configuration: unable to fetch remote include from git: failed to parse git reference alpine-base.yaml: not enough path data available
2023/11/06 13:01:35 error during command execution: failed to load image configuration: unable to fetch remote include from git: failed to parse git reference alpine-base.yaml: not enough path data available

The reson is that the cgr.dev/chainguard/apko image has no workdir specified:

docker inspect cgr.dev/chainguard/apko | jq .[0].Config.WorkingDir
""

therefore the default working directory is the root "/".

workarounds:

  • all path should be absolute, like: /work/examples/alpine-base.yaml (unconvenient)
  • specify WORKDIR for the official apko image: this would be the nicest solution i'm not sure if you have any objections against that
  • use --workdir or -w to specify the workdir at runtime

Right now the the 3 option is the quickest.

Signed-off-by: lalyos <lalyos@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant