@@ -13,7 +13,7 @@ import { createNullLifecycleHook, finishBackgroundTasks, ResolverParameters, Use
13
13
import { GoARCH , GoOS , getCLIHost , loadNativeModule } from '../spec-common/commonUtils' ;
14
14
import { resolve } from './configContainer' ;
15
15
import { URI } from 'vscode-uri' ;
16
- import { LogLevel , LogDimensions , toErrorText , createCombinedLog , createTerminalLog , Log , makeLog , LogFormat , createJSONLog , createPlainLog , LogHandler , replaceAllLog } from '../spec-utils/log' ;
16
+ import { LogLevel , LogDimensions , toErrorText , toWarningText , createCombinedLog , createTerminalLog , Log , makeLog , LogFormat , createJSONLog , createPlainLog , LogHandler , replaceAllLog } from '../spec-utils/log' ;
17
17
import { dockerComposeCLIConfig } from './dockerCompose' ;
18
18
import { Mount } from '../spec-configuration/containerFeaturesConfiguration' ;
19
19
import { getPackageConfig , PackageConfiguration } from '../spec-utils/product' ;
@@ -197,14 +197,18 @@ export async function createDockerParams(options: ProvisionOptions, disposables:
197
197
}
198
198
} ) ( ) ;
199
199
200
- const buildKitVersion = options . useBuildKit === 'never' ? undefined : ( await dockerBuildKitVersion ( {
201
- cliHost,
202
- dockerCLI : dockerPath ,
203
- dockerComposeCLI,
204
- env : cliHost . env ,
205
- output,
206
- platformInfo
207
- } ) ) ;
200
+ const buildKitVersion = async ( ) => {
201
+ if ( options . useBuildKit === 'never' ) {
202
+ return undefined ;
203
+ } else {
204
+ if ( await isPodman ( { exec : cliHost . exec , cmd : dockerPath , env : cliHost . env , output } ) ) {
205
+ output . write ( toWarningText ( 'Podman does not support BuildKit, defaulting to legacy builder.' ) ) ;
206
+ return undefined ;
207
+ }
208
+ return await dockerBuildKitVersion ( { cliHost, dockerCLI : dockerPath , dockerComposeCLI, env : cliHost . env , output, platformInfo } ) ;
209
+ }
210
+ } ;
211
+
208
212
return {
209
213
common,
210
214
parsedAuthority,
@@ -224,7 +228,7 @@ export async function createDockerParams(options: ProvisionOptions, disposables:
224
228
userRepositoryConfigurationPaths : [ ] ,
225
229
updateRemoteUserUIDDefault,
226
230
additionalCacheFroms : options . additionalCacheFroms ,
227
- buildKitVersion,
231
+ buildKitVersion : await buildKitVersion ( ) ,
228
232
isTTY : process . stdout . isTTY || options . logFormat === 'json' ,
229
233
experimentalLockfile,
230
234
experimentalFrozenLockfile,
0 commit comments