Skip to content

Commit

Permalink
add docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed Jul 11, 2024
1 parent f013449 commit f5e1796
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
28 changes: 28 additions & 0 deletions dev/docker/iceberg-rest-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"

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"]
42 changes: 42 additions & 0 deletions dev/docker/iceberg-rest-server/iceberg-rest-server-dependency.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOF >> "${script_dir}/packages/iceberg-rest-server/bin/iceberg-rest-server.sh"
# Keeping a process running in the background
tail -f /dev/null
EOF

0 comments on commit f5e1796

Please sign in to comment.