Skip to content

Commit 69380a6

Browse files
authored
Merge pull request #51 from DefangLabs/lio/ignore-dockerfile
Ignore Dockerfile/Compose files by default
2 parents 3b3dcf6 + 11e790f commit 69380a6

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
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: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,33 @@ 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
10-
**/.DS_Store
12+
**/__pycache__
1113
**/.direnv
14+
**/.DS_Store
1215
**/.envrc
1316
**/.git
1417
**/.github
1518
**/.idea
1619
**/.next
1720
**/.vscode
18-
**/__pycache__
21+
**/compose.*.yaml
22+
**/compose.*.yml
1923
**/compose.yaml
2024
**/compose.yml
21-
**/defang.exe
25+
**/docker-compose.*.yaml
26+
**/docker-compose.*.yml
2227
**/docker-compose.yaml
2328
**/docker-compose.yml
2429
**/node_modules
2530
**/Thumbs.db
31+
Dockerfile
32+
*.Dockerfile
2633
# Ignore our own binary, but only in the root to avoid ignoring subfolders
2734
defang
35+
defang.exe
2836
# Ignore our project-level state
2937
.defang`;
3038

0 commit comments

Comments
 (0)