confluentinc / cp-docker-images

[DEPRECATED] Docker images for Confluent Platform.
Apache License 2.0
1.14k stars 704 forks source link

apt-get update failing due to removal of Wheezy and Jessie (except LTS) from mirrors #714

Closed jimymodi closed 5 years ago

jimymodi commented 5 years ago

When I am doing apt-get update on base of confluentinc/cp-kafka-rest:4.0.0. It is failing with Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found It is because Removal of Wheezy and Jessie (except LTS) from mirrors

My Dockerfile for ref

FROM confluentinc/cp-kafka-rest:4.0.0

ENV TZ Asia/Kolkata

RUN apt-get update

RUN apt-get install -y uuid-runtime

COPY start-kafka-rest /usr/bin/start-kafka-rest

RUN chmod 755 /usr/bin/start-kafka-rest

ENTRYPOINT ["/usr/bin/start-kafka-rest"]
mprimeaux commented 5 years ago

I can confirm this is also the behavior for "confluentinc/cp-zookeeper:latest".

slepkin commented 5 years ago

This is also a problem for confluentinc/cp-kafka-connect:latest.

andybryant commented 5 years ago

Work arounds discussed here work... https://unix.stackexchange.com/questions/508724/failed-to-fetch-jessie-backports-repository .. but really the base image should be updated from jessie since it's now considered an obsolete release: https://www.debian.org/releases/ The latest KSQL image doesn't have the same issue since it's based on stretch

andybryant commented 5 years ago

confluentinc/cp-enterprise-control-center:5.1.2 has same issue.

ewencp commented 5 years ago

Hey folks, we've merged this update to address the issue: https://github.com/confluentinc/cp-docker-images/pull/717 We will be moving the base image too stretch, but please keep in mind that there are compatibility issues with updating these, so this is the sort of change that can only be made across major release versions. Just changing base image in bugfixes would break some downstream consumers.

For existing releases, subsequent bugfix releases of the images for that major.minor version will include the linked PR.

pdkproitf commented 5 years ago

This is also a problem for confluentinc/cp-kafka-connect:5.1.2

jinbowang commented 5 years ago

Do we have plan to retrofit this config into older versions?

maknihamdi commented 5 years ago

I think all debian images have this error. I already test this workarround https://unix.stackexchange.com/questions/508724/failed-to-fetch-jessie-backports-repository/508840#508840 with other image, and now I applied it with kafka-connect. Works fine!

you have to add this line to your Dockerfile

RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list 

RUN apt-get -o Acquire::Check-Valid-Until=false update && ....
ewencp commented 5 years ago

This has already been fixed back to 3.2.x branch in https://github.com/confluentinc/cp-docker-images/pull/717, so all builds against updated bug fix release versions back to then would have this change. Tagged releases are already tagged, so we can't retroactively update the tag, but you can just cherry-pick the change against a branch started from the tag if you want to rebuild those versions yourself.