Skip to content

Commit

Permalink
[yt/microservices/excel] Add docker images.
Browse files Browse the repository at this point in the history
c190f5e201ec6ec909f1562cf68247426342b351
  • Loading branch information
verytable committed Jun 10, 2024
1 parent 894417e commit 6384594
Show file tree
Hide file tree
Showing 7 changed files with 8,124 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"LICENSE":"yt/opensource/repos/ytsaurus-excel-integration/github_toplevel/LICENSE",
"README.md":"yt/microservices/excel/README.md",
"exporter/README.md":"yt/microservices/excel/exporter/README.md",
"exporter/build/docker/Dockerfile":"yt/microservices/excel/exporter/build/docker/Dockerfile",
"exporter/build/docker/build.sh":"yt/microservices/excel/exporter/build/docker/build.sh",
"exporter/build/docker/credits/excel-exporter.CREDITS":"yt/microservices/excel/exporter/build/docker/credits/excel-exporter.CREDITS",
"exporter/cmd/excel-exporter/main.go":"yt/microservices/excel/exporter/cmd/excel-exporter/main.go",
"exporter/cmd/excel-exporter/maxprocs.go":"yt/microservices/excel/exporter/cmd/excel-exporter/maxprocs.go",
"exporter/configs/example-config.yaml":"yt/microservices/excel/exporter/configs/example-config.yaml",
Expand All @@ -28,6 +31,9 @@
"go.mod":"yt/opensource/repos/ytsaurus-excel-integration/github_toplevel/go.mod",
"go.sum":"yt/opensource/repos/ytsaurus-excel-integration/github_toplevel/go.sum",
"uploader/README.md":"yt/microservices/excel/uploader/README.md",
"uploader/build/docker/Dockerfile":"yt/microservices/excel/uploader/build/docker/Dockerfile",
"uploader/build/docker/build.sh":"yt/microservices/excel/uploader/build/docker/build.sh",
"uploader/build/docker/credits/excel-uploader.CREDITS":"yt/microservices/excel/uploader/build/docker/credits/excel-uploader.CREDITS",
"uploader/cmd/excel-uploader/main.go":"yt/microservices/excel/uploader/cmd/excel-uploader/main.go",
"uploader/cmd/excel-uploader/maxprocs.go":"yt/microservices/excel/uploader/cmd/excel-uploader/maxprocs.go",
"uploader/configs/example-config.yaml":"yt/microservices/excel/uploader/configs/example-config.yaml",
Expand Down
20 changes: 20 additions & 0 deletions exporter/build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mirror.gcr.io/ubuntu:noble

USER root

WORKDIR /tmp

COPY ./excel-exporter /usr/bin/excel-exporter

# CREDITS files with licenses for all binaries.
COPY ./credits/excel-exporter.CREDITS /usr/bin/excel-exporter.CREDITS

RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y \
curl \
less \
gdb \
lsof \
strace \
telnet \
dnsutils \
iputils-ping
65 changes: 65 additions & 0 deletions exporter/build/docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash

script_name=$0

image_tag=""
ytsaurus_source_path="."
output_path="."
image_cr=""

print_usage() {
cat << EOF
Usage: $script_name [-h|--help]
[--ytsaurus-source-path /path/to/ytsaurus.repo (default: $ytsaurus_source_path)]
[--output-path /path/to/output (default: $output_path)]
[--image-tag some-tag (default: $image_tag)]
[--image-cr some-cr/ (default: $image_cr)]
EOF
exit 1
}

# Parse options
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--ytsaurus-source-path)
ytsaurus_source_path="$2"
shift 2
;;
--output-path)
output_path="$2"
shift 2
;;
--image-tag)
image_tag="$2"
shift 2
;;
--image-cr)
image_cr="$2"
shift 2
;;
-h|--help)
print_usage
shift
;;
*) # unknown option
echo "Unknown argument $1"
print_usage
;;
esac
done

excel_exporter="${ytsaurus_source_path}/yt/microservices/excel/exporter/cmd/excel-exporter/excel-exporter"
credits="${ytsaurus_source_path}/yt/docker/ytsaurus-excel-exporter/credits"

dockerfile="${ytsaurus_source_path}/yt/docker/ytsaurus-excel-exporter/Dockerfile"

cp ${excel_exporter} ${output_path}
cp ${dockerfile} ${output_path}

mkdir ${output_path}/credits
cp -r ${credits}/excel-exporter.CREDITS ${output_path}/credits

cd ${output_path}

docker build -t ${image_cr}ytsaurus/excel-exporter:${image_tag} .
Loading

0 comments on commit 6384594

Please sign in to comment.