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

API version incorrect #637

Open
genevera opened this issue Feb 3, 2024 · 10 comments
Open

API version incorrect #637

genevera opened this issue Feb 3, 2024 · 10 comments

Comments

@genevera
Copy link

genevera commented Feb 3, 2024

Expected Behavior

slim builds an image


Actual Behavior

I get an error about API versions, "cmd=build info=build.error status='standard.image.build.error' value='API /build requires version 1.25, requested version 1.24 is insufficient'"

slim build --dockerfile ./Dockerfile --tag image-name:slim --cbo-build-arg BUILD_ARG=arg --dockerfile-context $(pwd)
cmd=build info=param.http.probe message='using default probe'
cmd=build state=started
cmd=build info=params rt.as.user='true' keep.perms='true' image-build-engine='internal' target.type='dockerfile' context='/Users/genevera/src/image-name' file='./Dockerfile' continue.mode='probe'
cmd=build state=building message="building basic image"
cmd=build info=basic.image.info tag='image-name.fat:slim' dockerfile='./Dockerfile' context='/Users/genevera/src/image-name'
cmd=build log='regular.image.build' event=LOG.START tag='image-name.fat:slim'  ====================

cmd=build log='regular.image.build' event=LOG.END tag='image-name.fat:slim'  ====================
cmd=build info=build.error status='standard.image.build.error' value='API /build requires version 1.25, requested version 1.24 is insufficient'
cmd=build state=exited code=33554435 version=darwin/arm64|Transformer|1.40.11|latest|latest location=/opt/homebrew/bin
cmd=build info=report file='slim.report.json'
cmd=build info=exit code='33554435' version='darwin/arm64|Transformer|1.40.11|latest|latest' location='/opt/homebrew/bin'
app='slim' message='GitHub Discussions' info='https://github.com/slimtoolkit/slim/discussions'
app='slim' message='Join the CNCF Slack channel to ask questions or to share your feedback' info='https://cloud-native.slack.com/archives/C059QP1RH1S'
app='slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'

Steps to Reproduce the Problem

  1. run slim build

Specifications

  • Version: 1.40.11
  • Platform: darwin/arm64
@kcq
Copy link
Member

kcq commented Feb 3, 2024

This is possibly related to the --dockerfile flag... One work around is to let Docker build the original image, so you don't need to use the --dockerfile flag. Another workaround is to try the --crt-api-version global flag to specify the Docker API version to use there: slim --crt-api-version=1.25 build --dockerfile ./Dockerfile --tag image-name:slim --cbo-build-arg BUILD_ARG=arg --dockerfile-context $(pwd)

@genevera
Copy link
Author

genevera commented Feb 3, 2024

Unfortunately, using --crt-api-version=1.25 or --crt-api-version 1.25 results in the following error: time="2024-02-03T04:52:54-05:00" level=fatal msg="flag provided but not defined: -crt-api-version"

@genevera
Copy link
Author

genevera commented Feb 3, 2024

That last comment was all PEBKAC. I moved --crt-api-version before the verb and the error stopped.

@genevera
Copy link
Author

genevera commented Feb 3, 2024

I notice when trying to build from dockerfile that I get the following error no matter if i use --image-build-arch amd64 and/or --platform=$BUILDPLATFORM in the dockerfile:

cmd=build info=build.error value='no matching manifest for linux/arm64/v8 in the manifest list entries' status='standard.image.build.error'

It does appear to work when using an extant image, however.

@demonshreder
Copy link

Want to confirm this behaviour

slimtoolkit version : 1.40.11
docker (client + engine) version: 24.0.7
OS: Arch Linux x64

@iximiuz
Copy link
Collaborator

iximiuz commented Feb 9, 2024

Hey folks! Thanks for reporting! It'll likely be fixed in the next release by #641.

@SymbioticKilla
Copy link

Hey!
Is there any ETA?
Thanks!

@kcq
Copy link
Member

kcq commented Sep 22, 2024

@SymbioticKilla just to confirm... are you referring to the API version error? Can you double check if you see the same problem with the latest release

@SymbioticKilla
Copy link

@kcq
Oh, sorry. I haven't seen that there is a new name and repo.
docker-slim => slim => mint.

Thank you I'll test

@Seluj78
Copy link

Seluj78 commented Dec 11, 2024

For anyone confused like me regarding the updates, version problem or whatever, mint is deprecated, you now need to install mint: https://github.com/mintoolkit/mint

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

No branches or pull requests

6 participants