diff --git a/dev/docker/iceberg-rest-server/Dockerfile b/dev/docker/iceberg-rest-server/Dockerfile new file mode 100644 index 00000000000..8860ba7f7b9 --- /dev/null +++ b/dev/docker/iceberg-rest-server/Dockerfile @@ -0,0 +1,28 @@ +# +# 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 openjdk:8-jdk-buster +LABEL maintainer="support@datastrato.com" + +WORKDIR /root/iceberg-rest-server + +COPY packages/iceberg-rest-server /root/iceberg-rest-server + +EXPOSE 9001 + +ENTRYPOINT ["/bin/bash", "/root/iceberg-rest-server/bin/iceberg-rest-server.sh", "start"] diff --git a/dev/docker/iceberg-rest-server/iceberg-rest-server-dependency.sh b/dev/docker/iceberg-rest-server/iceberg-rest-server-dependency.sh new file mode 100755 index 00000000000..de316b2c47e --- /dev/null +++ b/dev/docker/iceberg-rest-server/iceberg-rest-server-dependency.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# 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. +# +set -ex +script_dir="$(dirname "${BASH_SOURCE-$0}")" +script_dir="$(cd "${script_dir}">/dev/null; pwd)" +gravitino_home="$(cd "${script_dir}/../../..">/dev/null; pwd)" + +# Prepare compile Iceberg REST server packages +cd ${gravitino_home} +./gradlew clean assembleIcebergRESTServer -x test + +# Removed old packages, Avoid multiple re-executions using the wrong file +rm -rf "${script_dir}/packages" +mkdir -p "${script_dir}/packages" + +cd distribution +tar xfz gravitino-iceberg-rest-server-*.tar.gz +cp -r gravitino-iceberg-rest-server*-bin ${script_dir}/packages/iceberg-rest-server + +# Keeping the container running at all times +cat <> "${script_dir}/packages/iceberg-rest-server/bin/iceberg-rest-server.sh" + +# Keeping a process running in the background +tail -f /dev/null +EOF