Add experimental dockerfiles

Added dockerfiles for rudder service and tiller run with
--experimental-release flag
pull/2079/head
Maciej Kwiek 8 years ago committed by Maciej Kwiek
parent c1fcaf09ce
commit cce50f8052

1
.gitignore vendored

@ -6,6 +6,7 @@ _dist/
_proto/*.pb.go _proto/*.pb.go
bin/ bin/
rootfs/tiller rootfs/tiller
rootfs/rudder
vendor/ vendor/
*.exe *.exe
.idea/ .idea/

@ -1,6 +1,7 @@
DOCKER_REGISTRY ?= gcr.io DOCKER_REGISTRY ?= gcr.io
IMAGE_PREFIX ?= kubernetes-helm IMAGE_PREFIX ?= kubernetes-helm
SHORT_NAME ?= tiller SHORT_NAME ?= tiller
SHORT_NAME_RUDDER ?= rudder
TARGETS = darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64 TARGETS = darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64
DIST_DIRS = find * -type d -exec DIST_DIRS = find * -type d -exec
APP = helm APP = helm
@ -60,12 +61,20 @@ docker-binary: BINDIR = ./rootfs
docker-binary: GOFLAGS += -a -installsuffix cgo docker-binary: GOFLAGS += -a -installsuffix cgo
docker-binary: docker-binary:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GO) build -o $(BINDIR)/tiller $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GO) build -o $(BINDIR)/tiller $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GO) build -o $(BINDIR)/rudder $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/rudder
.PHONY: docker-build .PHONY: docker-build
docker-build: check-docker docker-binary docker-build: check-docker docker-binary
docker build --rm -t ${IMAGE} rootfs docker build --rm -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE} docker tag ${IMAGE} ${MUTABLE_IMAGE}
.PHONY: docker-build-experimental
docker-build-experimental: check-docker docker-binary
docker build --rm -t ${IMAGE} rootfs -f rootfs/Dockerfile.experimental
docker tag ${IMAGE} ${MUTABLE_IMAGE}
docker build --rm -t ${IMAGE_RUDDER} rootfs -f rootfs/Dockerfile.rudder
docker tag ${IMAGE_RUDDER} ${MUTABLE_IMAGE_RUDDER}
.PHONY: test .PHONY: test
test: build test: build
test: TESTFLAGS += -race -v test: TESTFLAGS += -race -v

@ -0,0 +1,24 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.3
ENV HOME /tmp
COPY . /
EXPOSE 44134
CMD ["/tiller", "--experimental-release"]

@ -0,0 +1,23 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.3
ENV HOME /tmp
COPY . /
EXPOSE 10001
CMD ["/rudder"]

@ -22,12 +22,13 @@ endif
ifneq ($(GIT_TAG),) ifneq ($(GIT_TAG),)
LDFLAGS += -X k8s.io/helm/pkg/version.BuildMetadata= LDFLAGS += -X k8s.io/helm/pkg/version.BuildMetadata=
endif endif
LDFLAGS += -X k8s.io/helm/pkg/version.GitCommit=${GIT_COMMIT} LDFLAGS += -X k8s.io/helm/pkg/version.GitCommit=${GIT_COMMIT}
LDFLAGS += -X k8s.io/helm/pkg/version.GitTreeState=${GIT_DIRTY} LDFLAGS += -X k8s.io/helm/pkg/version.GitTreeState=${GIT_DIRTY}
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${DOCKER_VERSION} IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${DOCKER_VERSION}
IMAGE_RUDDER := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME_RUDDER}:${DOCKER_VERSION}
MUTABLE_IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION} MUTABLE_IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}
MUTABLE_IMAGE_RUDDER := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME_RUDDER}:${DOCKER_VERSION}
DOCKER_PUSH = docker push DOCKER_PUSH = docker push
ifeq ($(DOCKER_REGISTRY),gcr.io) ifeq ($(DOCKER_REGISTRY),gcr.io)

Loading…
Cancel
Save