Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/catalog/hms/testdata/hms_catalog/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:8-jre-slim AS build
FROM --platform=$BUILDPLATFORM openjdk:8-jre-slim AS build

ARG BUILDPLATFORM

RUN apt-get update -qq && apt-get -qq -y install curl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
hive-metastore:
image: iceberg-hive-metastore
build: ./
platform: ${DOCKER_DEFAULT_PLATFORM}
expose:
- 9083
environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
hive-metastore:
image: iceberg-hive-metastore
build: ./hms_catalog/
platform: ${DOCKER_DEFAULT_PLATFORM}
expose:
- 9083
environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:8-jre-slim AS build
FROM --platform=$BUILDPLATFORM openjdk:8-jre-slim AS build

RUN apt-get update -qq && apt-get -qq -y install curl

Expand Down
13 changes: 13 additions & 0 deletions crates/test_utils/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,23 @@ impl DockerCompose {
self.project_name.as_str()
}

fn get_os_arch() -> String {
let mut cmd = Command::new("docker");
cmd.arg("info")
.arg("--format")
.arg("{{.OSType}}/{{.Architecture}}");

get_cmd_output(cmd, "Get os arch".to_string())
.trim()
.to_string()
}

pub fn run(&self) {
let mut cmd = Command::new("docker");
cmd.current_dir(&self.docker_compose_dir);

cmd.env("DOCKER_DEFAULT_PLATFORM", Self::get_os_arch());

cmd.args(vec![
"compose",
"-p",
Expand Down