Skip to content

Commit

Permalink
Add in uc-docker to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pflooky committed Jun 14, 2024
1 parent 61794b1 commit adef8be
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
25 changes: 25 additions & 0 deletions bin/uc-docker
Original file line number Diff line number Diff line change
@@ -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
Binary file modified etc/db/h2db.mv.db
Binary file not shown.

0 comments on commit adef8be

Please sign in to comment.