尝试在ubuntu 16.04上运行build/run.sh
时失败并显示以下错误消息,有什么想法吗?
~/dev/kubernetes$ build/run.sh
+++ [0117 15:45:56] Verifying Prerequisites....
+++ [0117 15:45:56] Building Docker image kube-build:build-226b89c8c0-4-v1.7.4-1
+++ [0117 15:46:57] Keeping container amazing_ptolemy
+++ [0117 15:46:57] Keeping container amazing_ptolemy
+++ [0117 15:46:57] Keeping container amazing_ptolemy
+++ [0117 15:46:57] Keeping image kube-build:build-226b89c8c0-4-v1.7.4-1
+++ [0117 15:46:57] Creating data container kube-build-data-226b89c8c0-4-v1.7.4-1
+++ [0117 15:47:05] Syncing sources to container
+++ [0117 15:47:05] Stopping any currently running rsyncd container
+++ [0117 15:47:05] Starting rsyncd container
+++ [0117 15:47:07] Running rsync
+++ [0117 15:47:20] Stopping any currently running rsyncd container
+++ [0117 15:47:20] Running build command...
Invalid input - please specify a command to run.
!!! Error in build/../build/common.sh:546
'return 4' exited with status 4
Call stack:
1: build/../build/common.sh:546 kube::build::run_build_command(...)
2: build/run.sh:30 main(...)
Exiting with status 1
$ docker info
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 15
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 31
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null overlay bridge host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-59-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 2.886 GiB
Name: tomerb-VirtualBox
ID: 32UH:TVHM:FTSL:ZPZV:PHJH:FA2Y:LPSG:YZZW:TLUU:J6TQ:W5JF:SBKW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
答案 0 :(得分:2)
检查可用参数时,脚本中会触发错误。正如错误Invalid input - please specify a command to run.
所述,您应该使用脚本的子命令/参数,如README
build/run.sh make
:在容器中构建linux二进制文件。根据需要传递选项和包。build/run.sh make cross
:为所有平台构建所有二进制文件build/run.sh make test
:运行所有单元测试build/run.sh make test-integration
:运行集成测试build/run.sh make test-cmd
:运行CLI测试