mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-11-30 23:16:04 +07:00
add image for local-path-provisioner
This commit is contained in:
@@ -16,8 +16,9 @@ export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
PLATFORMS?=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
|
||||
OUTPUT?=
|
||||
PROGRESS=auto
|
||||
EXTRA_BUILD_OPT?=
|
||||
build: ensure-buildx
|
||||
docker buildx build --platform=${PLATFORMS} $(OUTPUT) --progress=$(PROGRESS) -t ${IMAGE} --pull .
|
||||
docker buildx build --platform=${PLATFORMS} $(OUTPUT) --progress=$(PROGRESS) -t ${IMAGE} --pull $(EXTRA_BUILD_OPT) .
|
||||
|
||||
# push the cross built image
|
||||
push: OUTPUT=--push
|
||||
|
||||
25
images/local-path-provisioner/Dockerfile
Normal file
25
images/local-path-provisioner/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright 2022 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 golang:1.18
|
||||
RUN git clone https://github.com/rancher/local-path-provisioner
|
||||
ARG VERSION
|
||||
RUN cd local-path-provisioner && \
|
||||
git fetch && git checkout "${VERSION}" && \
|
||||
scripts/build && \
|
||||
mv bin/local-path-provisioner /usr/local/bin/local-path-provisioner
|
||||
|
||||
FROM gcr.io/distroless/base-debian11
|
||||
COPY --from=0 /usr/local/bin/local-path-provisioner /usr/local/bin/local-path-provisioner
|
||||
ENTRYPOINT /usr/local/bin/local-path-provisioner
|
||||
17
images/local-path-provisioner/Makefile
Normal file
17
images/local-path-provisioner/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2022 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.
|
||||
VERSION=v0.0.22
|
||||
TAG=$(VERSION)-kind.0
|
||||
EXTRA_BUILD_OPT=--build-arg=VERSION=$(VERSION)
|
||||
include $(CURDIR)/../Makefile.common.in
|
||||
13
images/local-path-provisioner/README.md
Normal file
13
images/local-path-provisioner/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# local-path-provisioner
|
||||
|
||||
This image packages https://github.com/rancher/local-path-provisioner to meet
|
||||
our requirements.
|
||||
|
||||
- Not based on alpine (see: https://github.com/kubernetes/kubernetes/issues/109406#issuecomment-1103479928)
|
||||
- Control over building with current patched go version
|
||||
|
||||
## Building
|
||||
|
||||
You can `make quick` in this directory to build a test image.
|
||||
|
||||
To push an actual image use `make push`.
|
||||
Reference in New Issue
Block a user