File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,18 @@ export const isDockerAvailable = () => {
27
27
if ( dockerAvailableCache ) return dockerAvailableCache ;
28
28
else {
29
29
dockerAvailableCache = ( async ( ) => { // Catch sync & async setup errors
30
- await new Docker ( ) . ping ( )
30
+ return new Docker ( ) . info ( ) ;
31
31
} ) ( )
32
- . then ( ( ) => true )
32
+ . then ( ( info : { OSType ?: 'windows' | 'linux' } ) => {
33
+ if ( info . OSType === 'windows' ) {
34
+ // We don't support Windows containers yet (and I think they're very rarely
35
+ // used anyway) so we treat Windows-mode Docker as unavailable:
36
+ console . warn ( "Docker is running in Windows container mode - not supported" ) ;
37
+ return false ;
38
+ } else {
39
+ return true ;
40
+ }
41
+ } )
33
42
. catch ( ( ) => false ) ;
34
43
35
44
// Cache the resulting status for 3 seconds:
You can’t perform that action at this time.
0 commit comments