Skip to content

Instantly share code, notes, and snippets.

@VladRassokhin
Last active March 1, 2018 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladRassokhin/9d93866315ccabf62ae334c59d0f57df to your computer and use it in GitHub Desktop.
Save VladRassokhin/9d93866315ccabf62ae334c59d0f57df to your computer and use it in GitHub Desktop.
#cd `mktemp -d`
git clone https://github.com/yandex/clickhouse
cd clickhouse/
git checkout v1.1.54353-testing
cd docker/server/
docker build --build-arg version=1.1.54343 -t clickhouse-server:1.1.54343 .
# Fails with:
# Reading package lists...
# E: The repository 'https://repo.yandex.ru/clickhouse/xenial dists/stable/main/binary-amd64/ Release' is not signed.
# The command '/bin/sh -c apt update && apt install -y apt-transport-https && mkdir -p /etc/apt/sources.list.d && echo $repository | tee /etc/apt/sources.list.d/clickhouse.list && apt update && apt install --allow-unauthenticated -y clickhouse-server-common=$version clickhouse-server-base=$version && rm -rf /var/lib/apt/lists/* /var/cache/debconf && apt clean' returned a non-zero code: 100
# Rollback untested https://github.com/yandex/ClickHouse/commit/9ec8a576
sed -i.bak 's/apt /apt-get /' Dockerfile
docker build --build-arg version=1.1.54343 -t clickhouse-server:1.1.54343 .
# Build succeed, though if there's no IPv6 in runtime, clickhouse would fail to start
docker run -d --name test --ulimit nofile=262144:262144 -p 8123:8123 -p 9000:9000 clickhouse-server:1.1.54343
sleep 3; docker ps -a
## CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
#bee8fcd71aab clickhouse-server:1.1.54343 "/bin/sh -c 'exec ..." 14 seconds ago Exited (70) 13 seconds ago test
docker rm test
docker rmi clickhouse-server:1.1.54343
# Rollback untested https://github.com/yandex/ClickHouse/commit/2d9f6611
sed -i.bak '/<listen_host>::<\/listen_host>/d' docker_related_config.xml
docker build --build-arg version=1.1.54343 -t clickhouse-server:1.1.54343 .
docker run -d --name test --ulimit nofile=262144:262144 -p 8123:8123 -p 9000:9000 clickhouse-server:1.1.54343
sleep 3; docker ps -a
#CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
#69b106a0a0b8 clickhouse-server:1.1.54343 "/bin/sh -c 'exec ..." 5 seconds ago Up 4 seconds 0.0.0.0:8123->8123/tcp, 0.0.0.0:9000->9000/tcp, 9009/tcp test
#Finally!
docker stop test
docker rm test
docker rmi clickhouse-server:1.1.54343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment