Skip to content

Commit e604c5e

Browse files
committed
minor changes in script and dockerfile
1 parent a5d40cb commit e604c5e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dockerfiles/migration/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN chmod +x /workspace/script/wait-for-clickhouse.sh
1111
# Use distroless as minimal base image to package the manager binary
1212
# Refer to https://github.com/GoogleContainerTools/distroless for more details
1313
FROM golang:alpine
14+
RUN apk add --no-cache netcat-openbsd
1415
WORKDIR /
1516
COPY --from=builder /workspace/migration .
1617
COPY --from=builder /workspace/sql /sql

script/wait-for-clickhouse.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ MAX_RETRIES=60
77

88
retry_count=0
99
while [ $retry_count -lt $MAX_RETRIES ]; do
10-
if clickhouse-client --host $CLICKHOUSE_HOST --port $CLICKHOUSE_PORT --query "SELECT 1"; then
10+
if nc -z -v -w5 $CLICKHOUSE_HOST $CLICKHOUSE_PORT; then
1111
echo "ClickHouse is ready!"
1212
exit 0
1313
else

0 commit comments

Comments
 (0)