mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Use ARG instead of sed to set the base image for addon-manager.
This commit is contained in:
		@@ -12,7 +12,9 @@
 | 
				
			|||||||
# See the License for the specific language governing permissions and
 | 
					# See the License for the specific language governing permissions and
 | 
				
			||||||
# limitations under the License.
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM BASEIMAGE
 | 
					ARG BASEIMAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FROM ${BASEIMAGE}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN clean-install bash
 | 
					RUN clean-install bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,14 +30,13 @@ build:
 | 
				
			|||||||
	cp ./* $(TEMP_DIR)
 | 
						cp ./* $(TEMP_DIR)
 | 
				
			||||||
	curl -sSL --retry 5 https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/$(ARCH)/kubectl > $(TEMP_DIR)/kubectl
 | 
						curl -sSL --retry 5 https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/$(ARCH)/kubectl > $(TEMP_DIR)/kubectl
 | 
				
			||||||
	chmod a+rx $(TEMP_DIR)/kube-addons.sh $(TEMP_DIR)/kube-addons-main.sh $(TEMP_DIR)/kubectl
 | 
						chmod a+rx $(TEMP_DIR)/kube-addons.sh $(TEMP_DIR)/kube-addons-main.sh $(TEMP_DIR)/kubectl
 | 
				
			||||||
	cd $(TEMP_DIR) && sed -i.back "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifneq ($(ARCH),amd64)
 | 
					ifneq ($(ARCH),amd64)
 | 
				
			||||||
	# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
 | 
						# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
 | 
				
			||||||
	$(SUDO) ../../../third_party/multiarch/qemu-user-static/register/register.sh --reset
 | 
						$(SUDO) ../../../third_party/multiarch/qemu-user-static/register/register.sh --reset
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	docker build --pull -t $(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR)
 | 
						docker build --pull -t $(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR) --build-arg BASEIMAGE=$(BASEIMAGE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
push: build
 | 
					push: build
 | 
				
			||||||
	docker push $(IMAGE)-$(ARCH):$(VERSION)
 | 
						docker push $(IMAGE)-$(ARCH):$(VERSION)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user