【问题标题】:Click house build is stuck after inserting user password插入用户密码后点击房屋构建被卡住
【发布时间】:2022-01-03 12:23:42
【问题描述】:

Docker 文件

FROM ubuntu:20.04

ENV CH_VERSION 21.8.11.4
RUN \
  apt-get update && \
  apt-get install --yes --no-install-recommends \
    apt-transport-https \
    apt-utils \
    dirmngr \
    gnupg && \
  apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4 && \
  echo "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" | tee /etc/apt/sources.list.d/clickhouse.list && \
  apt-get update && \
  apt-get install --allow-unauthenticated -y \
    clickhouse-client=${CH_VERSION} \
    clickhouse-server=${CH_VERSION} \
    clickhouse-common-static=${CH_VERSION} \
    libgcc-7-dev \
    tzdata \
    libreadline-dev \
    curl && \
  rm -rf \
    /var/lib/apt/lists/* \
    /var/cache/debconf \
    /tmp/* && \
  apt-get clean

VOLUME /var/lib/clickhouse

RUN chown -R clickhouse /etc/clickhouse-server

USER clickhouse
EXPOSE 9000 8123 9009

ENTRYPOINT exec /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml

当尝试通过运行以下 cmd 来构建 clickhouse 图像时

docker build -t clickhouse-server:21.8.11.4 .

之后,要求输入默认用户密码 Screenshot

我尝试插入空白密码,也尝试插入随机密码,输入密码后卡住了

【问题讨论】:

    标签: docker dockerfile devops clickhouse


    【解决方案1】:

    设置

    ENV CH_VERSION=...
    ENV DEBIAN_FRONTEND=noninteractive
    

    详情请看https://www.cyberciti.biz/faq/explain-debian_frontend-apt-get-variable-for-ubuntu-debian/

    【讨论】:

    • 添加 ENV DEBIAN_FRONTEND=noninteractive build 后创建成功,但是当我运行 clickhouse 图像时出现错误 /bin/sh: 1: exec: /usr/bin/clickhouse-server: Operation not allowed跨度>
    • 在 ENTRYPOINT 之前添加 ``` RUN chmod +x /usr/bin/clickhouse-server ```
    • 在 ENTRYPOINT 错误前添加“RUN chmod +x /usr/bin/clickhouse-server”后:chmod:更改“/usr/bin/clickhouse-server”的权限:不允许操作
    猜你喜欢
    • 2018-09-07
    • 1970-01-01
    • 2020-11-10
    • 2012-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多