Skip to content

Buildkit support? #756

@vroad

Description

@vroad

Is your feature request related to a problem?
Yes. I was trying to build an phpfpm image with buildkit support to speed up composer install.
When I run docker build directly from command line it just works fine, but from devspace, build fails with an error like this:

[fatal]  Error building image 123456789012.dkr.ecr.ap-northeast-1.amazonaws.com/my-app/phpfpm:jtMKUvn: Info: Building image '123456789012.dkr.ecr.ap-northeast-1.amazonaws.com/my-app/phpfpm:jtMKUvn' with engine 'docker'
Wait: Authenticating (123456789012.dkr.ecr.ap-northeast-1.amazonaws.com)
Done: Authentication successful (123456789012.dkr.ecr.ap-northeast-1.amazonaws.com)
Sending build context to Docker daemon  4.529MB
 Error during image build: Error response from daemon: Dockerfile parse error line 16: Unknown flag: mount

Any Docketfile that contains RUN --mount=type=cache,target=/path/to/cache/directory won't work. Comment on first line that enables experimental feature (# syntax=docker/dockerfile:experimental) is just ignored.

Which solution do you suggest?
Add something like useBuildKit to devspace configuration. When enabled, devspace builds image with buildKit enabled.
https://skaffold.dev/docs/how-tos/builders/#configuration

Which alternative solutions exist?

Additional context
devspace version 4.1.2

/kind feature

Metadata

Metadata

Assignees

Labels

area/building-imagesIssues related to building Docker imagesarea/configIssues related to the configkind/featureNew feature or feature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions