@@ -13,7 +13,7 @@ import { createNullLifecycleHook, finishBackgroundTasks, ResolverParameters, Use
1313import { GoARCH , GoOS , getCLIHost , loadNativeModule } from '../spec-common/commonUtils' ;
1414import { resolve } from './configContainer' ;
1515import { 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' ;
1717import { dockerComposeCLIConfig } from './dockerCompose' ;
1818import { Mount } from '../spec-configuration/containerFeaturesConfiguration' ;
1919import { getPackageConfig , PackageConfiguration } from '../spec-utils/product' ;
@@ -197,14 +197,18 @@ export async function createDockerParams(options: ProvisionOptions, disposables:
197197 }
198198 } ) ( ) ;
199199
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+
208212 return {
209213 common,
210214 parsedAuthority,
@@ -224,7 +228,7 @@ export async function createDockerParams(options: ProvisionOptions, disposables:
224228 userRepositoryConfigurationPaths : [ ] ,
225229 updateRemoteUserUIDDefault,
226230 additionalCacheFroms : options . additionalCacheFroms ,
227- buildKitVersion,
231+ buildKitVersion : await buildKitVersion ( ) ,
228232 isTTY : process . stdout . isTTY || options . logFormat === 'json' ,
229233 experimentalLockfile,
230234 experimentalFrozenLockfile,
0 commit comments