Sign inSign up

linkprofit/clickhouse-server

By linkprofit

Updated about 7 years ago

Clickhouse image with fixtures

Image
0

177

linkprofit/clickhouse-server repository overview

Debian-based container for clickhouse

How to use this image

Create a docker-compose.yml

Suggested path for docker-compose.yml root of your project.

version: '3.6'
services:
    clickhouse-server:
      image: nafigat0r/clickhouse-server:19
      environment:
        DATABASE_NAME: db_name
        DATABASE_PORT: 9000
      networks:
        - network
      ports:
        - 9000:9000
      # init sql-files and custom config
      volumes:
        - ./clickhouse-server/19/conf.d:/etc/clickhouse-server/conf.d:ro
        - ./clickhouse-server/19/initdb.d:/docker-entrypoint-initdb.d
networks:
  network:
    driver: bridge
Add initial sql-files

Put your sql-files to initdb.d dir. Available formats: *.sql *.sql.gz *.csv *.csv.gz

Override config settings

Put your custom config settings to conf.d/overrides.xml directory. Example:

<?xml version="1.0"?>
<yandex>
    <logger>
        <!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
        <level>information</level>
        <log>/proc/self/fd/2</log>
        <errorlog>/proc/self/fd/2</errorlog>
    </logger>
    <tcp_port>9888</tcp_port>
    <listen_host>0.0.0.0</listen_host>
</yandex>

Build and run container
docker-compose build --force-rm --no-cache --pull
docker-compose up -d --remove-orphans
Run client
docker run --user $(id -u):$(id -g) --rm -ti nafigat0r/clickhouse-server:19 client --port 9888

Tag summary

Content type

Image

Digest

Size

99.9 MB

Last updated

about 7 years ago

docker pull linkprofit/clickhouse-server