Skip to content

Commit 83ca98f

Browse files
authored
Clean up docker Docker (#770)
- Switch to the `apache/iceberg-rest-fixture` - That contains now a healthcheck: apache/iceberg#11705 - Update docs to point to Orbstack, native Docker doesn't work (today)
1 parent 8b90c84 commit 83ca98f

File tree

5 files changed

+12
-31
lines changed

5 files changed

+12
-31
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,11 @@ cargo 1.69.0 (6e9a83356 2023-04-12)
114114

115115
#### Install Docker or Podman
116116

117-
Currently, iceberg-rust uses Docker to set up environment for integration tests. Podman is also supported.
117+
Currently, iceberg-rust uses Docker to set up environment for integration tests. Native Docker has some limitations, please check (https://github.com/apache/iceberg-rust/pull/748). Please use Orbstack or Podman.
118118

119-
You can learn how to install Docker from [here](https://docs.docker.com/get-docker/).
119+
For MacOS users, you can install [OrbStack](https://orbstack.dev/) as a docker alternative.
120120

121-
For macos users, you can install [OrbStack](https://orbstack.dev/) as a docker alternative.
122-
123-
For podman users, refer to [Using Podman instead of Docker](docs/contributing/podman.md)
121+
For podman, refer to [Using Podman instead of Docker](docs/contributing/podman.md)
124122

125123
## Build
126124

crates/catalog/rest/testdata/rest_catalog/docker-compose.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ networks:
2020

2121
services:
2222
rest:
23-
image: tabulario/iceberg-rest:0.10.0
23+
image: apache/iceberg-rest-fixture
2424
environment:
2525
- AWS_ACCESS_KEY_ID=admin
2626
- AWS_SECRET_ACCESS_KEY=password
2727
- AWS_REGION=us-east-1
28-
- CATALOG_CATOLOG__IMPL=org.apache.iceberg.jdbc.JdbcCatalog
28+
- CATALOG_CATALOG__IMPL=org.apache.iceberg.jdbc.JdbcCatalog
2929
- CATALOG_URI=jdbc:sqlite:file:/tmp/iceberg_rest_mode=memory
3030
- CATALOG_WAREHOUSE=s3://icebergdata/demo
3131
- CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO
@@ -34,8 +34,6 @@ services:
3434
- minio
3535
networks:
3636
rest_bridge:
37-
aliases:
38-
- icebergdata.minio
3937
expose:
4038
- 8181
4139

crates/integration_tests/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,5 @@ futures = { workspace = true }
3131
iceberg = { workspace = true }
3232
iceberg-catalog-rest = { workspace = true }
3333
iceberg_test_utils = { path = "../test_utils", features = ["tests"] }
34-
log = { workspace = true }
3534
parquet = { workspace = true }
36-
port_scanner = { workspace = true }
3735
tokio = { workspace = true }

crates/integration_tests/src/lib.rs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ use iceberg::io::{S3_ACCESS_KEY_ID, S3_ENDPOINT, S3_REGION, S3_SECRET_ACCESS_KEY
2121
use iceberg_catalog_rest::{RestCatalog, RestCatalogConfig};
2222
use iceberg_test_utils::docker::DockerCompose;
2323
use iceberg_test_utils::{normalize_test_name, set_up};
24-
use port_scanner::scan_port_addr;
25-
use tokio::time::sleep;
2624

2725
const REST_CATALOG_PORT: u16 = 8181;
2826

@@ -42,24 +40,15 @@ pub async fn set_test_fixture(func: &str) -> TestFixture {
4240
docker_compose.run();
4341

4442
let rest_catalog_ip = docker_compose.get_container_ip("rest");
45-
46-
let read_port = format!("{}:{}", rest_catalog_ip, REST_CATALOG_PORT);
47-
loop {
48-
if !scan_port_addr(&read_port) {
49-
log::info!("Waiting for 1s rest catalog to ready...");
50-
sleep(std::time::Duration::from_millis(1000)).await;
51-
} else {
52-
break;
53-
}
54-
}
55-
56-
let container_ip = docker_compose.get_container_ip("minio");
57-
let read_port = format!("{}:{}", container_ip, 9000);
43+
let minio_ip = docker_compose.get_container_ip("minio");
5844

5945
let config = RestCatalogConfig::builder()
6046
.uri(format!("http://{}:{}", rest_catalog_ip, REST_CATALOG_PORT))
6147
.props(HashMap::from([
62-
(S3_ENDPOINT.to_string(), format!("http://{}", read_port)),
48+
(
49+
S3_ENDPOINT.to_string(),
50+
format!("http://{}:{}", minio_ip, 9000),
51+
),
6352
(S3_ACCESS_KEY_ID.to_string(), "admin".to_string()),
6453
(S3_SECRET_ACCESS_KEY.to_string(), "password".to_string()),
6554
(S3_REGION.to_string(), "us-east-1".to_string()),

crates/integration_tests/testdata/docker-compose.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ networks:
2020

2121
services:
2222
rest:
23-
image: tabulario/iceberg-rest:0.10.0
23+
image: apache/iceberg-rest-fixture
2424
environment:
2525
- AWS_ACCESS_KEY_ID=admin
2626
- AWS_SECRET_ACCESS_KEY=password
2727
- AWS_REGION=us-east-1
28-
- CATALOG_CATOLOG__IMPL=org.apache.iceberg.jdbc.JdbcCatalog
28+
- CATALOG_CATALOG__IMPL=org.apache.iceberg.jdbc.JdbcCatalog
2929
- CATALOG_URI=jdbc:sqlite:file:/tmp/iceberg_rest_mode=memory
3030
- CATALOG_WAREHOUSE=s3://icebergdata/demo
3131
- CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO
@@ -34,8 +34,6 @@ services:
3434
- minio
3535
networks:
3636
rest_bridge:
37-
aliases:
38-
- icebergdata.minio
3937
ports:
4038
- 8181:8181
4139
expose:

0 commit comments

Comments
 (0)