首页 > 其他分享 >trino容器安装

trino容器安装

时间:2024-06-15 10:32:08浏览次数:9  
标签:容器 container 8080 Docker trino 安装 docker Trino

Trino in a Docker container#
The Trino project provides the trinodb/trino Docker image that includes the Trino server and a default configuration. The Docker image is published to Docker Hub and can be used with the Docker runtime, among several others.

Running the container#
To run Trino in Docker, you must have the Docker engine installed on your machine. You can download Docker from the Docker website, or use the packaging system of your operating systems.

Use the docker command to create a container from the trinodb/trino image. Assign it the trino name, to make it easier to reference it later. Run it in the background, and map the default Trino port, which is 8080, from inside the container to port 8080 on your workstation.

docker run --name trino -d -p 8080:8080 trinodb/trino
Without specifying the container image tag, it defaults to latest, but a number of any released Trino version can be used, for example trinodb/trino:449.

Run docker ps to see all the containers running in the background.

% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
955c3b3d3d0a trinodb/trino:390 "/usr/lib/trino/bin/…" 39 hours ago Up 39 hours (healthy) 0.0.0.0:8080->8080/tcp trino
When Trino is still starting, it shows (health: starting), and (healthy) when it’s ready.

Note

There are multiple ways to use Trino within containers. You can either run Trino in Docker containers locally, as explained in the following sections, or use a container orchestration platform like Kubernetes. For the Kubernetes instructions see Trino on Kubernetes with Helm.

Executing queries#
The image includes the Trino command-line interface (CLI) client, trino. Execute it in the existing container to connect to the Trino server running inside it. After starting the client, type and execute a query on a table of the tpch catalog, which includes example data:

$ docker exec -it trino trino
trino> select count(*) from tpch.sf1.nation;
_col0

25

(1 row)

Query 20181105_001601_00002_e6r6y, FINISHED, 1 node
Splits: 21 total, 21 done (100.00%)
0:06 [25 rows, 0B] [4 rows/s, 0B/s]
Once you are done with your exploration, enter the quit command.

Alternatively, you can use the Trino CLI installed directly on your workstation. The default server URL in the CLI of http://localhost:8080 matches the port used in the command to start the container. More information about using the CLI can be found in Command line interface. You can also connect with any other client application using the JDBC driver.

Configuring Trino#
The image already contains a default configuration to get started, and some catalogs to allow you to explore Trino. You can also use the container with your custom configuration files in a local etc directory structure as created in the Deploying Trino. If you mount this directory as a volume in the path /etc/trino when starting the container, your configuration is used instead of the default in the image.

$ docker run --name trino -d -p 8080:8080 --volume $PWD/etc:/etc/trino trinodb/trino
To keep the default configuration and only configure catalogs, mount a folder at /etc/trino/catalog, or individual catalog property files in it.

If you want to use additional plugins, mount them at /usr/lib/trino/plugin.

To avoid having to create catalog files and mount them in the container, you can enable dynamic catalog management by setting the CATALOG_MANAGEMENT environmental variable to dynamic.

$ docker run --name trino -d -p 8080:8080 -e CATALOG_MANAGEMENT=dynamic trinodb/trino
After connecting to Trino, execute Catalog management statements to create drop catalogs as desired. To make these changes persistent across container restarts, a volume must be mounted at /etc/trino/catalog.

Cleaning up#
You can stop and start the container, using the docker stop trino and docker start trino commands. To fully remove the stopped container, run docker rm trino

标签:容器,container,8080,Docker,trino,安装,docker,Trino
From: https://www.cnblogs.com/huft/p/18249067

相关文章

  • QT210开发板学习(1):SEC S5PC110 Test B/D驱动安装
    把开发板的开关拨到USBBOOT,通过USB线连接到开发板的OTG口,打开板上总电源,会提示驱动安装失败我们需要下载驱动(win7-64-DNW-USB)https://github.com/joyjohn131/QT210/tree/main/1打开dseo13b.exe,依次点击Next,Yes选择"EnableTestMode","Next",提示完成开启选择"SignaS......
  • 源码编译安装LAMP
    一、LAMP架构1、概述LAMP架构是目前成熟的企业网站应用模式之一,指的是协同工作的一整套系统和相关软件,能够提供动态Web站点服务及其应用开发环境。LAMP是一个缩写词,具体包括Linux操作系统、Apache网站服务器、MySQL数据库服务器、PHP(或Perl、Python)网页编程语言。2、LAMP......
  • Python如何离线安装第三方库?
    大家好,我是Python进阶者。一、前言前几天在Python最强王者交流群【斌】问了一个Python第三方库离线下载的问题,问题如下:求教大佬,这个库(python-docx/),能下载下来吗?我是链接另存为,但是速度太慢?二、实现过程这里【莫生气】给了个思路如下:直接pip安装就可以了吧?试试看加个源【斌......
  • 【第8章】如何利用ControlNet生成“可控画面”?(配置要求/一键安装/快速上手/生成第一张
    这节我们来讲AI绘画领域中一个很重要的概念:ControlNet,看下如何让生成的画面更可控。......
  • 【安装笔记-20240613-Linux-在 OpenWrt 的 LuCI界面支持命令行调试】
    安装笔记-系列文章目录安装笔记-20240613-Linux-在OpenWrt的LuCI界面支持命令行调试文章目录安装笔记-系列文章目录安装笔记-20240613-Linux-在OpenWrt的LuCI界面支持命令行调试前言一、软件介绍名称:ttyd主页官方介绍特点二、安装步骤测试版本:openwrt-23.05.3......
  • Optional容器对象
    Optional容器对象介绍Optional是一个容器对象,是java8引入新引进的类,可以用来解决空指针异常本质上这是一个包含可选值的包装类,所以Optional类可以含有对象也可以为空,Optional是Java实现函数式编程的强劲一步,并且帮助在范式中实现。但是本质尚Optional是一个包装器类,其中包含对......
  • win10 安装 nodejs
    转载自:https://www.cnblogs.com/Leo_wl/p/12388273.html#_label01、在使用之前,先类掌握3个东西,明白它们是用来干什么的:npm: nodejs下的包管理器。webpack:它主要用途是通过CommonJS的语法把所有浏览器端需要发布的静态资源作相应的准备,比如资源的合并和打包。vue-cli:......
  • Ubuntu 18.04 安装 ROS1
    Ubuntu08.04  安装ROS1sudoapt-getupdate忽略:1http://mirrors.ustc.edu.cn/ros/ubuntubionicInRelease错误:2http://mirrors.ustc.edu.cn/ros/ubuntubionicRelease 404 NotFound[IP:202.38.95.11080]命中:4http://security.ubuntu.com/ubuntubionic-sec......
  • 最新下载:Paragon NTFS for Mac 15【软件附加安装教程】
    ParagonNTFSforMac是Mac平台上一款非常优秀的读写工具,可以在MacOSX中完全读写、修改、访问NTFS硬盘、U盘等外接设备的文件。这款软件最大的亮点简书可以让我们读写NTFS分区,因为在MacOSX系统上,默认状态下我们只能读取NTFS分区,却无法进行写入。而且我们的移动硬盘或U......
  • 实用软件下载:MathType最新安装包及详细安装教程
    ​MathType是一款数学公式编辑器,用于创建和编辑数学表达式、方程式和符号。它提供了直观的界面和丰富的工具,使用户能够以专业水平轻松地生成高质量的数学公式。MathType支持各种常见的数学符号和结构,包括上下标、分数、根号、积分、矩阵等等,并且可以与许多流行的文字处理软件(如......