-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile.ch4
48 lines (40 loc) · 1.5 KB
/
Dockerfile.ch4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:18.04
ARG repository="deb http://repo.yandex.ru/clickhouse/deb/lts/ main/"
ARG version=19.14.10.16
ARG gosu_ver=1.10
RUN apt-get update \
&& apt-get install --yes --no-install-recommends \
apt-transport-https \
dirmngr \
gnupg \
&& mkdir -p /etc/apt/sources.list.d \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4 \
&& echo $repository > /etc/apt/sources.list.d/clickhouse.list \
&& apt-get update \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get install --allow-unauthenticated --yes --no-install-recommends \
clickhouse-common-static=$version \
clickhouse-client=$version \
clickhouse-server=$version \
libgcc-7-dev \
locales \
tzdata \
wget \
&& rm -rf \
/var/lib/apt/lists/* \
/var/cache/debconf \
/tmp/* \
&& apt-get clean
ADD https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 /bin/gosu
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN mkdir /docker-entrypoint-initdb.d
COPY ["./ch4_config.xml", "/etc/clickhouse-server/config.xml"]
COPY ["./include_from.xml", "/etc/clickhouse-server/include_from.xml"]
COPY ["./users.xml", "/etc/clickhouse-server/users.xml"]
COPY ["./dictionary.xml", "/etc/clickhouse-server/dictionary.xml"]
RUN chmod +x /bin/gosu
VOLUME /var/lib/clickhouse
CMD ["clickhouse-server", "--config-file=/etc/clickhouse-server/config.xml"]