Skip to content

hack: embed git revison into binaries - #398

Merged
tonistiigi merged 1 commit into
moby:masterfrom
AkihiroSuda:embed-version
May 22, 2018
Merged

hack: embed git revison into binaries#398
tonistiigi merged 1 commit into
moby:masterfrom
AkihiroSuda:embed-version

Conversation

@AkihiroSuda

@AkihiroSuda AkihiroSuda commented May 21, 2018

Copy link
Copy Markdown
Member

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Comment thread .dockerignore
@@ -1,2 +1,2 @@
bin
.buildstate
.tmp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why is this added here instead of just doing mkdir -p in the Dockerfile

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the directory is created in Dockerfile and this line is unneeded for .dockerignore, but just added for consistency with .gitignore.

FROM gobuild-base AS buildkit-base
WORKDIR /go/src/github.com/moby/buildkit
COPY . .
RUN mkdir .tmp; \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to my last comment: why create this directory at all?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that potentially we can create other files without contaminating the buildkit directory

@tonistiigi
tonistiigi merged commit d3eacf0 into moby:master May 22, 2018
yui-knk added a commit to yui-knk/buildkit that referenced this pull request Jun 30, 2018
The error appears in

```
RUN go build -ldflags "$(cat .tmp/ldflags)" -o /buildctl.exe ./cmd/buildctl
```

and

```
RUN go build -ldflags "$(cat .tmp/ldflags)" -o /buildkitd.exe ./cmd/buildkitd
```

We ignore ".tmp" by ".dockerignore" file, so `COPY . .`
does not copy ".tmp".
This commit changes the image for "cross-windows" and removes
not needed instructions which are done by "buildkit-base".

This is follow up of moby#398

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants