Skip to content

[experiment] apt-get upgrade in docker/server/Dockerfile#12124

Merged
alexey-milovidov merged 3 commits intomasterfrom
docker-apt-get-upgrade-1
Jul 6, 2020
Merged

[experiment] apt-get upgrade in docker/server/Dockerfile#12124
alexey-milovidov merged 3 commits intomasterfrom
docker-apt-get-upgrade-1

Conversation

@blinkov
Copy link
Contributor

@blinkov blinkov commented Jul 3, 2020

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Perform an upgrade of system packages in the clickhouse-server docker image.

@blinkov blinkov added the pr-build Pull request with build/testing/packaging improvement label Jul 3, 2020
@alexey-milovidov
Copy link
Member

@blinkov Missing description for changelog.

@alexey-milovidov alexey-milovidov self-assigned this Jul 4, 2020
&& echo $repository > /etc/apt/sources.list.d/clickhouse.list \
&& apt-get update \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" upgrade \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any idea why "upgrade" is needed?
Isn't it true that apt-get install installes the latest available version and apt-get update makes sure that the latest versions are available?

Copy link
Contributor

@filimonov filimonov Jul 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If base image has some outdated system packages they will be upgraded by that command. In good scenario it will do nothing. If it will update smth it will lead to increasing docker image size (it will contain not only base image + clickhouse, but also + upgraded packages). Ideally if base image will have all freshest version already.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@filimonov Maybe simply change to 20.04?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the idea of upgrade was to make sure that there are no outdated packages in the base image. I've tried to switch it to 20.04 as well. Unfortunately, all together it reduces the number of reported issues only by ~60%. One more experiment was to remove (purge) unused system packages after installing ClickHouse, but they happen to fail in their postrm scripts for some reason, so I didn't commit it.

So we could merge this PR because it somewhat improves the situation, but building the image from scratch as you tried in https://github.com/ClickHouse/ClickHouse/tree/master/docker/bare is probably indeed easier than fixing the minimal Ubuntu.

cc @alexey-milovidov @filimonov @alesapin

@alexey-milovidov alexey-milovidov added the st-discussion When the implementation aspects are not clear or when the PR is on hold due to questions. label Jul 5, 2020
@alexey-milovidov alexey-milovidov merged commit e60b888 into master Jul 6, 2020
@alexey-milovidov alexey-milovidov deleted the docker-apt-get-upgrade-1 branch July 6, 2020 20:28
@alexey-milovidov
Copy link
Member

Ok.

What we need to make "bare" Docker container full featured?

  • add ca-certificates;
  • as it supports custom entrypoint.sh, we need to add bash or dash or whatever...
  • from this point, things become more complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-build Pull request with build/testing/packaging improvement st-discussion When the implementation aspects are not clear or when the PR is on hold due to questions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants