diff --git a/dev/hms/Dockerfile b/dev/containers/hms/Dockerfile similarity index 100% rename from dev/hms/Dockerfile rename to dev/containers/hms/Dockerfile diff --git a/dev/hms/core-site.xml b/dev/containers/hms/core-site.xml similarity index 100% rename from dev/hms/core-site.xml rename to dev/containers/hms/core-site.xml diff --git a/dev/containers/provision/Dockerfile b/dev/containers/provision/Dockerfile new file mode 100644 index 0000000000..e830c5030b --- /dev/null +++ b/dev/containers/provision/Dockerfile @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +COPY provision.py /opt/spark/provision.py + +CMD ["sh", "-c", "uv run /opt/spark/provision.py && touch /tmp/provision_complete && tail -f /dev/null"] diff --git a/dev/spark/provision.py b/dev/containers/provision/provision.py similarity index 100% rename from dev/spark/provision.py rename to dev/containers/provision/provision.py diff --git a/dev/spark/Dockerfile b/dev/containers/spark/Dockerfile similarity index 100% rename from dev/spark/Dockerfile rename to dev/containers/spark/Dockerfile diff --git a/dev/spark/spark-defaults.conf b/dev/containers/spark/spark-defaults.conf similarity index 100% rename from dev/spark/spark-defaults.conf rename to dev/containers/spark/spark-defaults.conf diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 9d288580df..4c2bb2ac93 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -109,7 +109,7 @@ services: # ============================================================================= hive-metastore: build: - context: ./hms + context: ./containers/hms dockerfile: Dockerfile platform: ${DOCKER_DEFAULT_PLATFORM:-linux/amd64} depends_on: @@ -163,7 +163,7 @@ services: # ============================================================================= spark-iceberg: build: - context: ./spark + context: ./containers/spark dockerfile: Dockerfile networks: iceberg_test: @@ -188,15 +188,15 @@ services: # Provision service - creates test data via Spark provision: - image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim + build: + context: ./containers/provision + dockerfile: Dockerfile networks: iceberg_test: depends_on: spark-iceberg: condition: service_healthy - entrypoint: ["/bin/sh", "-c", "uv run /opt/spark/provision.py && touch /tmp/provision_complete && tail -f /dev/null"] volumes: - - ./spark/provision.py:/opt/spark/provision.py:ro - uv-cache:/root/.cache/uv healthcheck: test: ["CMD-SHELL", "[ -f /tmp/provision_complete ]"]