Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#462 from codenrhoden/base-images
Browse files Browse the repository at this point in the history
Create base images for bootstrap and manifests
  • Loading branch information
k8s-ci-robot authored Jul 25, 2019
2 parents 1a5fd76 + 7719681 commit 9e51ae0
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
22 changes: 22 additions & 0 deletions hack/tools/bootstrap-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2019 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 photon:2.0
LABEL "maintainer" "Travis Rhoden <trhoden@vmware.com"

RUN tdnf install -y \
iputils \
wget \
openssh \
gettext
29 changes: 29 additions & 0 deletions hack/tools/bootstrap-base/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2019 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.

all: build

VERSION ?= $(shell git describe --always --dirty)
IMAGE_NAME ?= gcr.io/cluster-api-provider-vsphere/extra/bootstrap-base
IMAGE_TAG ?= $(IMAGE_NAME):$(VERSION)

build:
docker build -t $(IMAGE_TAG) .
docker tag $(IMAGE_TAG) $(IMAGE_NAME):latest
.PHONY: build

push:
docker push $(IMAGE_TAG)
docker push $(IMAGE_NAME):latest
.PHONY: push
33 changes: 33 additions & 0 deletions hack/tools/manifests-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2019 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.

################################################################################
## DOWNLOAD DEPENDENCIES ##
################################################################################
FROM debian:stretch-slim as kustomize
LABEL "maintainer" "Travis Rhoden <trhoden@vmware.com>"

RUN apt-get --assume-no update && apt-get -y install \
curl \
python \
&& rm -rf /var/lib/apt/lists/*

################################################################################
## DOWNLOAD KUSTOMIZE ##
################################################################################
ARG KUSTOMIZE_VERSION
ENV KUSTOMIZE_VERSION 2.0.0
RUN curl -Lo /usr/local/bin/kustomize \
"https://github.com/kubernetes-sigs/kustomize/releases/download/v${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64" && \
chmod 0755 /usr/local/bin/kustomize
30 changes: 30 additions & 0 deletions hack/tools/manifests-base/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2019 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.

all: build

VERSION ?= $(shell git describe --always --dirty)
IMAGE_NAME ?= gcr.io/cluster-api-provider-vsphere/extra/manifests-base
IMAGE_TAG ?= $(IMAGE_NAME):$(VERSION)
KUSTOMIZE_VERSION ?= 2.0.0

build:
docker build --build-arg KUSTOMIZE_VERSION=$(KUSTOMIZE_VERSION) -t $(IMAGE_TAG) .
docker tag $(IMAGE_TAG) $(IMAGE_NAME):latest
.PHONY: build

push:
docker push $(IMAGE_TAG)
docker push $(IMAGE_NAME):latest
.PHONY: push

0 comments on commit 9e51ae0

Please sign in to comment.