spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

Please don't update ubuntu packages within the docker-compose

Open alexanderankin opened this issue 2 years ago • 3 comments

Problem description: The problem I'm seeing is very high cpu usage when i reboot my pc, htop says it is the containers from the getting started guide of this project.

Solution description: I think the solution here is to simply not run apt-get update in the docker-compose file. I can submit a PR which fixes this and simply waits for the port instead of downloading a dependency to do it

Description of alternatives: An alternative is to add this to the images used:

https://github.com/spring-cloud/spring-cloud-dataflow/blob/0b9ff6024c2983f63e16ab5709c697af31a0203f/src/docker-compose/docker-compose.yml#L57

https://github.com/spring-cloud/spring-cloud-dataflow/blob/0b9ff6024c2983f63e16ab5709c697af31a0203f/src/docker-compose/docker-compose.yml#L124

it seems like somehow this script already exists in this image, for instance:

https://github.com/spring-cloud/spring-cloud-dataflow/blob/0b9ff6024c2983f63e16ab5709c697af31a0203f/src/docker-compose/docker-compose.yml#L111-L120

Additional context: seems like updating ubuntu packages on multiple containers detracts from the overall introductory experience

alexanderankin avatar May 18 '22 13:05 alexanderankin

btw here's how you'd do it - https://github.com/alexanderankin/docker-compose-waiting/commit/c24d20b8ad6cdc2afa68e47e75fa724ae0c8bace

alexanderankin avatar May 24 '22 15:05 alexanderankin

@markpollack - i should submit a pr for this right? I could get to it within the coming week

alexanderankin avatar Jun 04 '22 12:06 alexanderankin

sure, basically we just need to remove apt-get update in the docker compose file as it is already performed when creating the base image.

markpollack avatar Jul 20 '22 15:07 markpollack

Closed via https://github.com/spring-cloud/spring-cloud-dataflow/commit/50c59379d16525a1bbcb0a0058938788dd178d03

onobc avatar Sep 08 '22 14:09 onobc