From adef8be7acb1ddb4dc51b01ebbb132a0cf86cdc6 Mon Sep 17 00:00:00 2001 From: Flook Peter Date: Fri, 14 Jun 2024 12:38:20 +0800 Subject: [PATCH] Add in uc-docker to Dockerfile --- Dockerfile | 1 + README.md | 2 +- bin/uc-docker | 25 +++++++++++++++++++++++++ etc/db/h2db.mv.db | Bin 57344 -> 53248 bytes 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 bin/uc-docker diff --git a/Dockerfile b/Dockerfile index 1a7da5a8d..7e845c3ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ WORKDIR /opt/app COPY server/target/unitycatalog-server-assembly.jar unitycatalog-server.jar COPY examples/cli/target/unitycatalog-cli-assembly.jar unitycatalog-cli.jar COPY etc etc +COPY bin/uc-docker uc ENV SERVER_PROPERTIES_FILE=/opt/app/etc/conf/server.properties ENV SERVER_JOG4J_CONFIGURATION_FILE=/opt/app/etc/conf/server.log4j2.properties diff --git a/README.md b/README.md index f804f957b..038e33db9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ You have to ensure that you local environment has the following: ### Run the UC Server ```shell -docker run -d -i --name unitycatalog -p 8080:8080 datacatering/unitycatalog:0.1.0 +docker run -d -i --name unitycatalog -p 8081:8081 datacatering/unitycatalog:0.1.0 ``` diff --git a/bin/uc-docker b/bin/uc-docker new file mode 100755 index 000000000..d312a1649 --- /dev/null +++ b/bin/uc-docker @@ -0,0 +1,25 @@ +#!/bin/bash + +# Function to properly quote arguments +quote_arg() { + local arg="$1" + # Escape spaces in the argument + arg="\"${arg//\"/\\\"}\"" + echo "$arg" +} + +# Iterate over all arguments and quote them properly +quoted_args=() +for arg in "$@"; do + quoted_args+=("$(quote_arg "$arg")") +done + +# Join quoted arguments into a single string +quoted_args_str="${quoted_args[*]}" + +# Print the quoted arguments for debugging +# echo "Quoted arguments: $quoted_args_str" + +CLI_JAVA_COMMAND="java -cp unitycatalog-cli.jar io.unitycatalog.cli.UnityCatalogCli" +# echo "Running command: $CLI_JAVA_COMMAND" +eval "$CLI_JAVA_COMMAND" "$quoted_args_str" || exit diff --git a/etc/db/h2db.mv.db b/etc/db/h2db.mv.db index 6619e339f5b0f020a87e76ad5cae57b4e740e081..80b0435abf4e98960777b40892f0cc97ba797a8d 100644 GIT binary patch delta 3435 zcmb`Je{dXS8OPsuH@Vzhl1m!e(k2Z}Q>i7rw(sq}d$)I2^Z*+ZkVuoJO)5e6-hJ1G zmR!Fpe>}T; z@7^^khx2Ao zjwWxjj^?;dKxbk7n9b>QJCQH$6aUOHepyA`DC!^UHW+q(_7gFy#oHV#C!D!~uE%h2=DJh+Cb}p&-IbK(pNLU3;Gm|D z@EhTHDAR)TfxiBx?ckUk28WbNrHMhqQ!=Rmo#$uf4|DsP@}Amh!9aO%@aUZwHElat zVr+ianqeQx!9?)WSp}!synyh28k~5mzXoBHQ%gQ)Ov2?ebIi1S<_44Pwr&!$)@~aH zlYQ*8WfIw*(NdaxcGAS}Q-O6k$%G4V!wz0}?HQfQ0X$=y(jji8L+8M0J8ZWJVYLMu zViDP{K}5@qS=6Sq*2gj!*(trV(t1{UT{MkwfuhAy8U$7Wp@HuN>ctq?5M!Y5@kgIq zoGYsfeUU4}V3&sv4Pk20qOEJNBM96PG20gre=kL`Bcgp*D*G4zLiklV4gN`Mn?A+&T)A1L4jXd@F_O_LYZiHeHlyrNpYL4N*xEr*WqWEuL z%jXg}CGx|$^}8Z%7~zj~UcP7G!ppA>zT+DM{hMxxeE0zDvgzKfY4=mZ$D8n?=o$GO zj=1MWKC0kT;+?x5jo#h5LP1zTVs>nkd)X+#ctX5uYy$tveQ0b5<1dMqcOSudF*QDl zKQ7LW_u^OFAB}e?_!05a-s|w4ZvVtyjJw1glN0!Ycz$v-zE!+F`9+My7xq1>KCmVy zhTeBk{p#AQ1-bd$#@D<3Y=>QT6n^gSuJie>#%#~ei`dlB)n<_F*+69KL$cqkdg<#Y zw%wTa?g?uN<3V?n{V7aw(q}4q79sWK!C&{Ho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