Skip to content

Commit 8fdb9c6

Browse files
fix: patch issue in docker build context (#259)
1 parent 52efa32 commit 8fdb9c6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cli/src/execDocker/docker.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Docker from 'dockerode';
22
import os from 'os';
3+
import { readdir } from 'fs/promises';
34
import { createSigintAbortSignal } from '../utils/abortController.js';
45

56
type ProgressEvent = { stream?: string };
@@ -28,9 +29,11 @@ export async function dockerBuild({
2829
progressCallback?: (msg: string) => void;
2930
}): Promise<string> {
3031
const osType = os.type();
32+
33+
const contextPath = process.cwd(); // Use current working directory
3134
const buildArgs = {
32-
context: process.cwd(), // Use current working directory
33-
src: ['./'],
35+
context: contextPath,
36+
src: await readdir(contextPath), // Include all files of the context
3437
};
3538

3639
// by default force to build amd64 image which is architecture used in iExec workers

0 commit comments

Comments
 (0)