Skip to content

Commit 63d0b6e

Browse files
aiden-deloryntekton-robot
authored andcommitted
Add Dockerfiles for Windows entrypoint and nop images
This change adds two new Dockerfiles under 'images/windows/'. These can be used to build Windows images for the entrypoint and nop binaries. Docker is used to build these images because Ko does not currently support building for Windows.
1 parent a4d7f43 commit 63d0b6e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ARG BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:1809
2+
3+
FROM golang:1.16.4 AS builder
4+
5+
COPY . c:/gopath/src/github.com/tektoncd/pipeline
6+
7+
WORKDIR c:/gopath/src/github.com/tektoncd/pipeline
8+
9+
RUN go build -o c:/gopath/bin/entrypoint.exe ./cmd/entrypoint
10+
11+
FROM ${BASE_IMAGE}
12+
13+
COPY --from=builder c:/gopath/bin/entrypoint.exe c:/ProgramData/tektoncd/pipeline/entrypoint.exe
14+
15+
# Copy kodata into the image
16+
# NOTE: The COPY instruction does not follow symbolic links
17+
COPY ./.git/HEAD ./LICENSE c:/ProgramData/tektoncd/pipeline/data/
18+
19+
COPY ./.git/refs c:/ProgramData/tektoncd/pipeline/data/refs/
20+
21+
COPY ./third_party c:/ProgramData/tektoncd/pipeline/data/third-party/
22+
23+
ENTRYPOINT ["c:/ProgramData/tektoncd/pipeline/entrypoint.exe"]

images/windows/nop/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ARG BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:1809
2+
3+
FROM golang:1.16.4 AS builder
4+
5+
COPY . c:/gopath/src/github.com/tektoncd/pipeline
6+
7+
WORKDIR c:/gopath/src/github.com/tektoncd/pipeline
8+
9+
RUN go build -o c:/gopath/bin/nop.exe ./cmd/nop
10+
11+
FROM ${BASE_IMAGE}
12+
13+
COPY --from=builder c:/gopath/bin/nop.exe c:/ProgramData/tektoncd/pipeline/nop.exe
14+
15+
# Copy kodata into the image
16+
# NOTE: The COPY instruction does not follow symbolic links
17+
COPY ./.git/HEAD ./LICENSE c:/ProgramData/tektoncd/pipeline/data/
18+
19+
COPY ./.git/refs c:/ProgramData/tektoncd/pipeline/data/refs/
20+
21+
COPY ./third_party c:/ProgramData/tektoncd/pipeline/data/third-party/
22+
23+
ENTRYPOINT ["c:/ProgramData/tektoncd/pipeline/nop.exe"]

0 commit comments

Comments
 (0)