@@ -5,29 +5,26 @@ FROM ubuntu:22.04
55ARG DEBIAN_FRONTEND=noninteractive
66
77# ARG for quick switch to a given ubuntu mirror
8- ARG apt_archive="https ://archive.ubuntu.com"
8+ ARG apt_archive="http ://archive.ubuntu.com"
99
1010# We shouldn't use `apt upgrade` to not change the upstream image. It's updated biweekly
1111
12- # We need ca-certificates first to be able to update all repos. This is why it's run twice
13- RUN apt-get update \
14- && apt-get install ca-certificates --yes --no-install-recommends --verbose-versions
15-
16-
1712# user/group precreated explicitly with fixed uid/gid on purpose.
1813# It is especially important for rootless containers: in that case entrypoint
1914# can't do chown and owners of mounted volumes should be configured externally.
2015# We do that in advance at the begining of Dockerfile before any packages will be
2116# installed to prevent picking those uid / gid by some unrelated software.
2217# The same uid / gid (101) is used both for alpine and ubuntu.
23- RUN sed -i -e "s|http://archive.ubuntu.com|${apt_archive}|g" -e "s|https ://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list \
18+ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list \
2419 && groupadd -r clickhouse --gid=101 \
2520 && useradd -r -g clickhouse --uid=101 --home-dir=/var/lib/clickhouse --shell=/bin/bash clickhouse \
2621 && apt-get update \
2722 && apt-get install --yes --no-install-recommends \
23+ ca-certificates \
2824 locales \
2925 tzdata \
30- wget
26+ wget \
27+ && rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
3128
3229ARG REPO_CHANNEL="stable"
3330ARG REPOSITORY="deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb ${REPO_CHANNEL} main"
@@ -120,9 +117,6 @@ RUN clickhouse local -q 'SELECT 1' >/dev/null 2>&1 && exit 0 || : \
120117 && chmod ugo+Xrw -R /etc/clickhouse-server /etc/clickhouse-client
121118# The last chmod is here to make the next one is No-op in docker official library Dockerfile
122119
123- # Cleanup
124- RUN rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
125-
126120# post install
127121# we need to allow "others" access to clickhouse folder, because docker container
128122# can be started with arbitrary uid (openshift usecase)
0 commit comments