Skip to content

Full samplecontroller example #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
34 changes: 34 additions & 0 deletions samples/full/controller/src/samplecontroller/Dockerfile.controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Instructions to install API using the installer
# Build and test the controller-manager
FROM golang:1.9.3 as builder

ENV TEST_ASSET_DIR /usr/local/bin
ENV TEST_ASSET_KUBECTL $TEST_ASSET_DIR/kubectl
ENV TEST_ASSET_KUBE_APISERVER $TEST_ASSET_DIR/kube-apiserver
ENV TEST_ASSET_ETCD $TEST_ASSET_DIR/etcd

# Download test framework binaries
ENV TEST_ASSET_URL https://storage.googleapis.com/k8s-c10s-test-binaries
RUN curl ${TEST_ASSET_URL}/etcd-Linux-x86_64 --output $TEST_ASSET_ETCD
RUN curl ${TEST_ASSET_URL}/kube-apiserver-Linux-x86_64 --output $TEST_ASSET_KUBE_APISERVER
RUN curl https://storage.googleapis.com/kubernetes-release/release/v1.9.2/bin/linux/amd64/kubectl --output $TEST_ASSET_KUBECTL
RUN chmod +x $TEST_ASSET_ETCD
RUN chmod +x $TEST_ASSET_KUBE_APISERVER
RUN chmod +x $TEST_ASSET_KUBECTL

# Copy in the go src
WORKDIR /go/src/samplecontroller
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/

# Build and test the API code
RUN go build -a -o controller-manager ./cmd/controller-manager/main.go
RUN go test ./pkg/... ./cmd/...

# Copy the controller-manager into a thin image
FROM ubuntu:latest
# RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/src/samplecontroller/controller-manager .
CMD ["./controller-manager", "--install-crds=false"]
Loading