File tree Expand file tree Collapse file tree 5 files changed +19
-2
lines changed
catalog/hms/testdata/hms_catalog
integrations/datafusion/testdata Expand file tree Collapse file tree 5 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16- FROM openjdk:8-jre-slim AS build
16+ FROM --platform=$BUILDPLATFORM openjdk:8-jre-slim AS build
17+
18+ ARG BUILDPLATFORM
1719
1820RUN apt-get update -qq && apt-get -qq -y install curl
1921
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ services:
4141 hive-metastore :
4242 image : iceberg-hive-metastore
4343 build : ./
44+ platform : ${DOCKER_DEFAULT_PLATFORM}
4445 expose :
4546 - 9083
4647 environment :
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ services:
4141 hive-metastore :
4242 image : iceberg-hive-metastore
4343 build : ./hms_catalog/
44+ platform : ${DOCKER_DEFAULT_PLATFORM}
4445 expose :
4546 - 9083
4647 environment :
Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16- FROM openjdk:8-jre-slim AS build
16+ FROM --platform=$BUILDPLATFORM openjdk:8-jre-slim AS build
1717
1818RUN apt-get update -qq && apt-get -qq -y install curl
1919
Original file line number Diff line number Diff line change @@ -39,10 +39,23 @@ impl DockerCompose {
3939 self . project_name . as_str ( )
4040 }
4141
42+ fn get_os_arch ( ) -> String {
43+ let mut cmd = Command :: new ( "docker" ) ;
44+ cmd. arg ( "info" )
45+ . arg ( "--format" )
46+ . arg ( "{{.OSType}}/{{.Architecture}}" ) ;
47+
48+ get_cmd_output ( cmd, "Get os arch" . to_string ( ) )
49+ . trim ( )
50+ . to_string ( )
51+ }
52+
4253 pub fn run ( & self ) {
4354 let mut cmd = Command :: new ( "docker" ) ;
4455 cmd. current_dir ( & self . docker_compose_dir ) ;
4556
57+ cmd. env ( "DOCKER_DEFAULT_PLATFORM" , Self :: get_os_arch ( ) ) ;
58+
4659 cmd. args ( vec ! [
4760 "compose" ,
4861 "-p" ,
You can’t perform that action at this time.
0 commit comments