当前位置: 首页 > news >正文

反编译 Trino Dockerfile

文章目录

    • 反编译 Trino Dockerfile
      • 反编译Dockerfile命令
      • 反编译后Dockerfile内容
      • 获取 Trino 启动脚本
      • 卸载

反编译 Trino Dockerfile

反编译Dockerfile命令

alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/laniksj/dfimage"
dfimage trinodb/trino:432

反编译后Dockerfile内容

Unable to find image 'ghcr.io/laniksj/dfimage:latest' locally
latest: Pulling from laniksj/dfimage
4abcf2066143: Pull complete 
a9cd27405e55: Pull complete 
905b6ecc7ae9: Pull complete 
2799eae2f25b: Pull complete 
eddc0410333a: Pull complete 
e79eaf700b78: Pull complete 
c9222d5c8c6f: Pull complete 
fb2a4c462b18: Pull complete 
Digest: sha256:a9b7704ff2a927649d872c05b179ada8bb1503387f58f125bfbf0a155749f05e
Status: Downloaded newer image for ghcr.io/laniksj/dfimage:latest
FROM <base image not found locally>
ADD file:139424fc60c0a17394da68faf4af3a17c9e959b6a1ce74c5b53ffc959145a63c in /
RUN /bin/sh -c mv -f /etc/yum.repos.d/ubi.repo /tmp || :
ADD file:ecc29a1455ca1b7c82018555e16e2e802135974523df6748e431f8707e759ddd in /tmp/tls-ca-bundle.pem
ADD multi:eed63f5f84efa377cb20d8bc2a3294d6aeffff59ee5380d49f1903b9673516dd in /etc/yum.repos.d/
LABEL maintainer="Red Hat, Inc."
LABEL com.redhat.component="ubi9-minimal-container"       name="ubi9-minimal"       version="9.2"
LABEL com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI"
LABEL summary="Provides the latest release of the minimal Red Hat Universal Base Image 9."
LABEL description="The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly."
LABEL io.k8s.display-name="Red Hat Universal Base Image 9 Minimal"
LABEL io.openshift.expose-services=""
LABEL io.openshift.tags="minimal rhel9"
ENV container oci
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CMD ["/bin/bash"]
RUN /bin/sh -c rm -rf /var/log/*
ADD file:d4e564939c7991d70e1c5392b02502c604ec36a1612a39fc922b8bb32a567932 in /root/buildinfo/content_manifests/ubi9-minimal-container-9.2-750.1697625013.json
ADD file:7aa78ccab5aa351a2b340ceba6ac1dad0988268ffec2b6ff113734e516c775f9 in /root/buildinfo/Dockerfile-ubi9-minimal-9.2-750.1697625013
LABEL "release"="750.1697625013" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2023-10-18T11:30:28" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="7ef59505f75bf0c11c8d3addefebee5ceaaf4c41" "io.k8s.description"="The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly." "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/ubi9-minimal/images/9.2-750.1697625013"
RUN /bin/sh -c rm -f '/etc/yum.repos.d/odcs-2460177-f3ccb.repo' '/etc/yum.repos.d/gitweb-a7836.repo'
RUN /bin/sh -c rm -f /tmp/tls-ca-bundle.pem
RUN /bin/sh -c mv -fZ /tmp/ubi.repo /etc/yum.repos.d/ubi.repo || :
RUN ARG JDK_VERSION
RUN ENV JAVA_HOME=/usr/lib/jvm/jdk-21.0.1
RUN ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/jdk-21.0.1/bin
RUN COPY /usr/lib/jvm/jdk-21.0.1 /usr/lib/jvm/jdk-21.0.1 # buildkit
RUN RUN |1 JDK_VERSION=21.0.1 /bin/sh -c set -xeu \&&     microdnf update -y \&&     microdnf install -y tar less python3 shadow-utils \&&     update-alternatives --install /usr/bin/python python /usr/bin/python3 1 \&&     groupadd trino --gid 1000 \&&     useradd trino --uid 1000 --gid 1000 --create-home \&&     mkdir -p /usr/lib/trino /data/trino \&&     chown -R "trino:trino" /usr/lib/trino /data/trino # buildkit
RUN ARG TRINO_VERSION
RUN COPY trino-cli-432-executable.jar /usr/bin/trino # buildkit
RUN COPY trino-server-432 /usr/lib/trino # buildkit
RUN COPY default/etc /etc/trino # buildkit
RUN COPY /libjvmkill.so /usr/lib/trino/bin # buildkit
RUN EXPOSE map[8080/tcp:{}]
RUN USER trino:trino
RUN CMD ["/usr/lib/trino/bin/run-trino"]
RUN HEALTHCHECK &{["CMD-SHELL" "/usr/lib/trino/bin/health-check"] "10s" "5s" "10s" '\x00'}

获取 Trino 启动脚本

# 下载 trino helm
helm repo add trino https://trinodb.github.io/charts/
helm pull trino/trino --version 0.19.0# 部署一个demo trino on k8s集群,获取官方run-trino脚本
# Chart.yaml 上级目录下执行
helm install example-trino-cluster trino/trino # 根据反编译Dockerfile内容 'RUN CMD ["/usr/lib/trino/bin/run-trino"]' 登录pod查看 /usr/lib/trino/bin/run-trino内容
# 登录 pod
kubectl exec -it example-trino-cluster-coordinator-77dbb597dd-sn2x4 -- bash
cat /usr/lib/trino/bin/run-trino# 从pod 拷贝 libjvmkill.so 到宿主机
# kubectl cp example-trino-cluster-coordinator-77dbb597dd-wszvm:/usr/lib/trino/bin/libjvmkill.so ./libjvmkill.so# 卸载
# helm uninstall example-trino-cluster 
# cat /usr/lib/trino/bin/run-trino#!/bin/bashset -xeuo pipefaillauncher_opts=(--etc-dir /etc/trino)
if ! grep -s -q 'node.id' /etc/trino/node.properties; thenlauncher_opts+=("-Dnode.id=${HOSTNAME}")
fiexec /usr/lib/trino/bin/launcher run "${launcher_opts[@]}" "$@"
# cat /usr/lib/trino/bin/health-check #!/bin/bashset -euo pipefailfunction get_property() {grep "^$1=" "$2" | cut -d'=' -f2
}scheme=http
port=8080config=/etc/trino/config.properties
# prefer to use http even if https is enabled
if [ "$(get_property 'http-server.http.enabled' "$config")" == "false" ]; thenscheme=httpsport=$(get_property http-server.https.port "$config")
elseport=$(get_property http-server.http.port "$config")
fiendpoint="$scheme://localhost:$port/v1/info"# add --insecure to disable certificate verification in curl, in case a self-signed certificate is being used
if ! info=$(curl --fail --silent --show-error --insecure "$endpoint"); thenecho >&2 "Server is not responding to requests"exit 1
fiif ! grep -q '"starting":\s*false' <<<"$info" >/dev/null; thenecho >&2 "Server is starting"exit 1
fi

卸载

# 卸载
helm uninstall example-trino-cluster 

相关文章:

  • 基于单片机的自行车里程监测系统的设计
  • 撤销最近一次的提交,使用git revert 和 git reset的区别
  • 【HarmonyOS尝鲜课】- 前言
  • TransFormer学习之VIT算法解析
  • 【调试笔记-20240525-Windows-配置 QEMU/x86_64 运行 OpenWrt-23.05 发行版并搭建 WordPress 博客网站】
  • 汽车制造业安全有效的设计图纸文件外发系统是什么样的?
  • Scala的简单学习一
  • 【JavaEE 初阶(十)】JVM
  • 【秒杀系统】从零开始打造简易秒杀系统(一):防止超卖
  • mysql实战——xtrabackup全量备份/增量备份及恢复
  • 机械产品3d模型网站让您的展示内容更加易于分享和传播
  • 大模型基础知识
  • 记录一次安装k8s初始化失败
  • 介绍下 npm 模块安装机制,为什么输入 npm install 就可以自动安装对应的模块
  • Docker 入门版
  • gops —— Go 程序诊断分析工具
  • js继承的实现方法
  • node 版本过低
  • node.js
  • NSTimer学习笔记
  • Python学习之路13-记分
  • React-redux的原理以及使用
  • spring-boot List转Page
  • sublime配置文件
  • 浮动相关
  • 干货 | 以太坊Mist负责人教你建立无服务器应用
  • 好的网址,关于.net 4.0 ,vs 2010
  • 判断客户端类型,Android,iOS,PC
  • 深度学习中的信息论知识详解
  • 实战:基于Spring Boot快速开发RESTful风格API接口
  • 微服务入门【系列视频课程】
  • 我的业余项目总结
  • 要让cordova项目适配iphoneX + ios11.4,总共要几步?三步
  • 一个SAP顾问在美国的这些年
  • 转载:[译] 内容加速黑科技趣谈
  • [Shell 脚本] 备份网站文件至OSS服务(纯shell脚本无sdk) ...
  • ​​​​​​​Installing ROS on the Raspberry Pi
  • ​Z时代时尚SUV新宠:起亚赛图斯值不值得年轻人买?
  • # 详解 JS 中的事件循环、宏/微任务、Primise对象、定时器函数,以及其在工作中的应用和注意事项
  • (7)svelte 教程: Props(属性)
  • (8)Linux使用C语言读取proc/stat等cpu使用数据
  • (NSDate) 时间 (time )比较
  • (Python) SOAP Web Service (HTTP POST)
  • (pytorch进阶之路)扩散概率模型
  • (windows2012共享文件夹和防火墙设置
  • (动手学习深度学习)第13章 计算机视觉---微调
  • (附源码)ssm基于jsp高校选课系统 毕业设计 291627
  • (附源码)ssm基于web技术的医务志愿者管理系统 毕业设计 100910
  • (一)Docker基本介绍
  • (一)python发送HTTP 请求的两种方式(get和post )
  • (转)大型网站的系统架构
  • (转)为C# Windows服务添加安装程序
  • .NET 6 在已知拓扑路径的情况下使用 Dijkstra,A*算法搜索最短路径
  • .NET 8 编写 LiteDB vs SQLite 数据库 CRUD 接口性能测试(准备篇)
  • .NET Core 网络数据采集 -- 使用AngleSharp做html解析