mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Switched back to rootless docker
This commit is contained in:
18
Makefile
18
Makefile
@@ -4,8 +4,9 @@
|
|||||||
# Makefile for kustomize CLI and API.
|
# Makefile for kustomize CLI and API.
|
||||||
|
|
||||||
MYGOBIN := $(shell go env GOPATH)/bin
|
MYGOBIN := $(shell go env GOPATH)/bin
|
||||||
|
MYDOCKERBIN := $(HOME)/bin
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
export PATH := $(MYGOBIN):$(PATH)
|
export PATH := $(MYGOBIN):$(MYDOCKERBIN):$(PATH)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: verify-kustomize
|
all: verify-kustomize
|
||||||
@@ -194,17 +195,14 @@ lint-kustomize: install-tools $(builtinplugins)
|
|||||||
build-kustomize-api: $(builtinplugins)
|
build-kustomize-api: $(builtinplugins)
|
||||||
cd api; go build ./...
|
cd api; go build ./...
|
||||||
|
|
||||||
.PHONY: install-docker
|
# Using the approach from https://docs.docker.com/engine/security/rootless/#install
|
||||||
install-docker:
|
# pinning docker 19.03.11
|
||||||
curl -fsSL https://get.docker.com| sh
|
$(MYDOCKERBIN)/docker:
|
||||||
docker --version
|
curl -fsSL https://raw.githubusercontent.com/docker/docker-install/3d1b8a8/rootless-install.sh | FORCE_ROOTLESS_INSTALL=1 sh
|
||||||
service docker status
|
|
||||||
service docker restart
|
|
||||||
docker run hello-world
|
|
||||||
|
|
||||||
.PHONY: test-unit-kustomize-api
|
.PHONY: test-unit-kustomize-api
|
||||||
test-unit-kustomize-api: build-kustomize-api install-docker
|
test-unit-kustomize-api: build-kustomize-api $(MYDOCKERBIN)/docker
|
||||||
cd api; go test ./... -ldflags "-X sigs.k8s.io/kustomize/api/provenance.version=v444.333.222"
|
cd api; DOCKER_HOST=unix://$(XDG_RUNTIME_DIR)/docker.sock go test ./... -ldflags "-X sigs.k8s.io/kustomize/api/provenance.version=v444.333.222"
|
||||||
|
|
||||||
.PHONY: test-unit-kustomize-plugins
|
.PHONY: test-unit-kustomize-plugins
|
||||||
test-unit-kustomize-plugins:
|
test-unit-kustomize-plugins:
|
||||||
|
|||||||
Reference in New Issue
Block a user