-system 'docker build -t kibana:7.6.2 .' +BASE_IMAGE_DICT = {
- 'aarch64' => 'gagara/kibana-oss-arm64:7.6.2',
- 'x86_64' => 'kibana:7.6.2' }.freeze
why need add freeze?
rubocop:Style/MutableConstant: Freeze mutable objects assigned to constants. 节省内存
Thanks, Yinsi
Thanks, Shenwei
+BASE_IMAGE = BASE_IMAGE_DICT[%x(arch).chomp]
+system "docker build -t kibana:7.6.2 --build-arg BASE_IMAGE=#{BASE_IMAGE} ."
2.23.0