Skip to content

Commit 0a42f15

Browse files
committed
Ignore Dockerfile by default
1 parent 32934ea commit 0a42f15

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/test1/ignored.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file should not be included in the build context
2+
FROM scratch

upload.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { promises as stream } from "stream";
66
import * as tar from "tar";
77

88
const SOURCE_DATE_EPOCH = process.env["SOURCE_DATE_EPOCH"] ?? "315532800"; // defaults to 1980-01-01, same as nix-shell
9+
10+
// The default .dockerignore for projects that don't have one. Keep in sync with pkg/cli/context.go in CLI repo.
911
const defaultDockerIgnore = `# Default .dockerignore file for Defang
1012
**/.DS_Store
1113
**/.direnv
@@ -18,13 +20,15 @@ const defaultDockerIgnore = `# Default .dockerignore file for Defang
1820
**/__pycache__
1921
**/compose.yaml
2022
**/compose.yml
21-
**/defang.exe
2223
**/docker-compose.yaml
2324
**/docker-compose.yml
2425
**/node_modules
2526
**/Thumbs.db
27+
Dockerfile
28+
*.Dockerfile
2629
# Ignore our own binary, but only in the root to avoid ignoring subfolders
2730
defang
31+
defang.exe
2832
# Ignore our project-level state
2933
.defang`;
3034

0 commit comments

Comments
 (0)