Comments (2)
Note that other files in .dockerignore
are properly ignored.
from skaffold.
I just noticed another difference between docker build .
and skaffold build
: it seems that skaffold does NOT copy the .dockerignore
file, while docker build
does! It's not even possible to do COPY .dockerignore .
using skaffold (although I'm not sure why you'd ever want that).
$ docker build .
(...)
> [builder 4/5] RUN ls -la ; false:
0.117 total 32
0.117 drwxr-xr-x 1 root root 4096 May 2 12:08 .
0.117 drwxr-xr-x 1 root root 4096 May 2 12:08 ..
0.117 -rw-rw-r-- 1 root root 11 May 2 12:00 .dockerignore
0.117 -rw-rw-r-- 1 root root 571 Mar 14 12:48 README.md
0.117 -rw-rw-r-- 1 root root 82 Mar 14 12:48 go.mod
0.117 -rw-rw-r-- 1 root root 133 Mar 14 12:48 k8s-pod.yaml
0.117 -rw-rw-r-- 1 root root 128 Mar 14 12:48 main.go
0.117 -rw-rw-r-- 1 root root 130 May 2 11:56 skaffold.yaml
$ skaffold build
(...)
Step 4/10 : RUN ls -la ; false
---> Running in 444c2c1e6f30
total 32
drwxr-xr-x 1 root root 4096 May 2 12:09 .
drwxr-xr-x 1 root root 4096 May 2 12:09 ..
-rw-rw-r-- 1 root root 470 May 2 12:05 Dockerfile
-rw-rw-r-- 1 root root 571 Mar 14 12:48 README.md
-rw-rw-r-- 1 root root 82 Mar 14 12:48 go.mod
-rw-rw-r-- 1 root root 133 Mar 14 12:48 k8s-pod.yaml
-rw-rw-r-- 1 root root 128 Mar 14 12:48 main.go
-rw-rw-r-- 1 root root 130 May 2 11:56 skaffold.yaml
Diff with getting-started example:
diff --git a/examples/getting-started/.dockerignore b/examples/getting-started/.dockerignore
new file mode 100644
index 000000000..94143827e
--- /dev/null
+++ b/examples/getting-started/.dockerignore
@@ -0,0 +1 @@
+Dockerfile
diff --git a/examples/getting-started/Dockerfile b/examples/getting-started/Dockerfile
index 67f8c3cbb..3798e28db 100644
--- a/examples/getting-started/Dockerfile
+++ b/examples/getting-started/Dockerfile
@@ -1,7 +1,7 @@
FROM golang:1.18 as builder
WORKDIR /code
-COPY main.go .
-COPY go.mod .
+COPY . .
+RUN ls -la ; false
# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
ARG SKAFFOLD_GO_GCFLAGS
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -trimpath -o /app main.go
from skaffold.
Related Issues (20)
- First and last images are not detected when loading images to the cluster HOT 5
- Setting Cloud Run Job MaxRetries to 0 when using Cloud Deploy with skaffold and rawYaml HOT 1
- Kaniko "Flag --snapshotMode is deprecated. Use: --snapshot-mode"
- Decouple Skaffold from `gcloud` CLI
- make preview-docs-v2 fails
- (Optionally enable) output manifests to filesystem
- Bug in `tryImportMissing` behaviour for derived images
- [ko builder] Image digest is not updated when kodata files are changed
- make build-docs-preview-v2 fails
- Using modules/profiles and a single Helm chart
- heredoc makes Skaffold abort
- skaffold 2 with multiple deployers kubectl and helm in one time config values in skaffold.yaml
- [DOCS]: Release notes for `v2.13.0` _Full Changelog_ link is wrong HOT 1
- Wrong host for docker API calls when using an ssh DOCKER_HOST HOT 1
- Gradle build concurrency can result in deadlocks
- helm templates with lookup function not working with skaffold v2
- Question: what is the recommended approach to work with multi-module Gradle+Jib project
- Confusing "Image is not used" warning
- Gradle wrapper is not detected reliably HOT 1
- skaffold.yaml with only `portForward` errors out with "nothing to deploy"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skaffold.