🐳 Update Ubuntu Image (#46784)

* 🐳 Update Ubuntu Image

Signed-off-by: Julio Jimenez <julio@clickhouse.com>

* Ready for testing

Signed-off-by: Julio Jimenez <julio@clickhouse.com>

* add back wget

Signed-off-by: Julio Jimenez <julio@clickhouse.com>

* add back wget

Signed-off-by: Julio Jimenez <julio@clickhouse.com>

* add back wget

Signed-off-by: Julio Jimenez <julio@clickhouse.com>

---------

Signed-off-by: Julio Jimenez <julio@clickhouse.com>
This commit is contained in:
Julio Jimenez 2023-02-27 14:43:16 -05:00 committed by GitHub
parent 0764649c5d
commit 76d0fb3cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04 FROM ubuntu:22.04
# see https://github.com/moby/moby/issues/4032#issuecomment-192327844 # see https://github.com/moby/moby/issues/4032#issuecomment-192327844
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@ -9,13 +9,14 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list
&& groupadd -r clickhouse --gid=101 \ && groupadd -r clickhouse --gid=101 \
&& useradd -r -g clickhouse --uid=101 --home-dir=/var/lib/clickhouse --shell=/bin/bash clickhouse \ && useradd -r -g clickhouse --uid=101 --home-dir=/var/lib/clickhouse --shell=/bin/bash clickhouse \
&& apt-get update \ && apt-get update \
&& apt-get upgrade -yq \
&& apt-get install --yes --no-install-recommends \ && apt-get install --yes --no-install-recommends \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
dirmngr \ dirmngr \
gnupg \ gnupg2 \
locales \
wget \ wget \
locales \
tzdata \ tzdata \
&& apt-get clean && apt-get clean
@ -80,15 +81,8 @@ RUN arch=${TARGETARCH:-amd64} \
&& mkdir -p /var/lib/clickhouse /var/log/clickhouse-server /etc/clickhouse-server /etc/clickhouse-client \ && mkdir -p /var/lib/clickhouse /var/log/clickhouse-server /etc/clickhouse-server /etc/clickhouse-client \
&& chmod ugo+Xrw -R /var/lib/clickhouse /var/log/clickhouse-server /etc/clickhouse-server /etc/clickhouse-client && chmod ugo+Xrw -R /var/lib/clickhouse /var/log/clickhouse-server /etc/clickhouse-server /etc/clickhouse-client
# Remove as much of Ubuntu as possible. RUN apt-get autoremove --purge -yq libksba8 && \
# ClickHouse does not need Ubuntu. It can run on top of Linux kernel without any OS distribution. apt-get autoremove -yq
# ClickHouse does not need Docker at all. ClickHouse is above all that.
# It does not care about Ubuntu, Docker, or other cruft and you should neither.
# The fact that this Docker image is based on Ubuntu is just a misconception.
# Some vulnerability scanners are arguing about Ubuntu, which is not relevant to ClickHouse at all.
# ClickHouse does not care when you report false vulnerabilities by running some Docker scanners.
RUN apt-get remove --purge -y libksba8 && apt-get autoremove -y
# we need to allow "others" access to clickhouse folder, because docker container # we need to allow "others" access to clickhouse folder, because docker container
# can be started with arbitrary uid (openshift usecase) # can be started with arbitrary uid (openshift usecase)