Message ID | fc8ae732b7c23135bfc826ba28a49045c2dddd76.1517755438.git.yann.morin.1998@free.fr |
---|---|
State | Accepted |
Commit | 5fdf5e4099ac8ca624b27f3b01d2a3eafb13e4f9 |
Headers | show |
Series | [1/5] support/docker: limit the number of layers | expand |
On 04-02-18 15:44, Yann E. MORIN wrote: > Since we're now using a specific base image tag, we need to also use a > specific, stable repository to get additional packages from for this > image. > > As such, use the Debian snapshot that matches the base image. > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Cc: Arnout Vandecappelle <arnout@mind.be> > Cc: Peter Korsgaard <peter@korsgaard.com> > --- > support/docker/Dockerfile | 7 +++++++ > support/docker/apt-sources.list | 4 ++++ > 2 files changed, 11 insertions(+) > create mode 100644 support/docker/apt-sources.list > > diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile > index 49b74b88bd..f18d195f37 100644 > --- a/support/docker/Dockerfile > +++ b/support/docker/Dockerfile > @@ -3,7 +3,11 @@ > # sudo docker build -t buildroot/base support/docker > # sudo docker push buildroot/base > > +# We use a specific tag for the base image *and* the corresponding date > +# for the repository., so do not forget to update the apt-sources.list > +# file that is shipped next to this Dockerfile. > FROM debian:stretch-20171210 > + > LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \ > vendor="Buildroot" \ > description="Container with everything needed to run Buildroot" > @@ -11,6 +15,9 @@ description="Container with everything needed to run Buildroot" > # Setup environment > ENV DEBIAN_FRONTEND noninteractive > > +# This repository can be a bit slow at times. Don't panic... > +COPY apt-sources.list /etc/apt/sources.list > + > # The container has no package lists, so need to update first > RUN dpkg --add-architecture i386 && \ > apt-get update -y && \ > diff --git a/support/docker/apt-sources.list b/support/docker/apt-sources.list > new file mode 100644 > index 0000000000..789fb8fc17 > --- /dev/null > +++ b/support/docker/apt-sources.list > @@ -0,0 +1,4 @@ > +# Latest just before 20171210T000000Z: > +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch main AFAIU, snapshot should resolve any date to the latest available snapshot, so http://snapshot.debian.org/archive/debian/20171210T000000Z/ should work as well here. It should redirect to exactly the same URLs. Note thought that this doesn't work for the top-level, only for a specific release (because they are snapshotted at different times). So just clicking on the URL above won't work, but if you put dists/stretch after it it redirects to http://snapshot.debian.org/archive/debian/20171209T220346Z/dists/stretch/ Anyway, OK for now, but something to keep in mind when it is bumped. Regards, Arnout > +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch-updates main > +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20171209T224618Z/ stretch/updates main >
Arnout, All, On 2018-02-06 09:52 +0100, Arnout Vandecappelle spake thusly: > On 04-02-18 15:44, Yann E. MORIN wrote: > > Since we're now using a specific base image tag, we need to also use a > > specific, stable repository to get additional packages from for this > > image. [--SNIP--] > > diff --git a/support/docker/apt-sources.list b/support/docker/apt-sources.list > > new file mode 100644 > > index 0000000000..789fb8fc17 > > --- /dev/null > > +++ b/support/docker/apt-sources.list > > @@ -0,0 +1,4 @@ > > +# Latest just before 20171210T000000Z: > > +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch main > > AFAIU, snapshot should resolve any date to the latest available snapshot, so > http://snapshot.debian.org/archive/debian/20171210T000000Z/ should work as well > here. It should redirect to exactly the same URLs. Yeah, I knew about the latest-prior-to-given-date rule, but see below... > Note thought that this > doesn't work for the top-level, only for a specific release (because they are > snapshotted at different times). So just clicking on the URL above won't work, > but if you put dists/stretch after iti For me, I even got http 500, and apt-get update would also fail from time to time (about once for three). That is indeed something I should have mentioned in the commit log. > it redirects to > http://snapshot.debian.org/archive/debian/20171209T220346Z/dists/stretch/ nd what's even weird ios that it now works, even for the debian-security suite, which is not tagged at the same date: http://snapshot.debian.org/archive/debian-security/20171209T224618Z/dists/stretch/updates/ > Anyway, OK for now, but something to keep in mind when it is bumped. Yeah, I also would have preferred it, but as I said, it was sometimes failing for me... :-/ Thanks for the feedback! :-) Regards, Yann E. MORIN.
diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile index 49b74b88bd..f18d195f37 100644 --- a/support/docker/Dockerfile +++ b/support/docker/Dockerfile @@ -3,7 +3,11 @@ # sudo docker build -t buildroot/base support/docker # sudo docker push buildroot/base +# We use a specific tag for the base image *and* the corresponding date +# for the repository., so do not forget to update the apt-sources.list +# file that is shipped next to this Dockerfile. FROM debian:stretch-20171210 + LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \ vendor="Buildroot" \ description="Container with everything needed to run Buildroot" @@ -11,6 +15,9 @@ description="Container with everything needed to run Buildroot" # Setup environment ENV DEBIAN_FRONTEND noninteractive +# This repository can be a bit slow at times. Don't panic... +COPY apt-sources.list /etc/apt/sources.list + # The container has no package lists, so need to update first RUN dpkg --add-architecture i386 && \ apt-get update -y && \ diff --git a/support/docker/apt-sources.list b/support/docker/apt-sources.list new file mode 100644 index 0000000000..789fb8fc17 --- /dev/null +++ b/support/docker/apt-sources.list @@ -0,0 +1,4 @@ +# Latest just before 20171210T000000Z: +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch main +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch-updates main +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20171209T224618Z/ stretch/updates main
Since we're now using a specific base image tag, we need to also use a specific, stable repository to get additional packages from for this image. As such, use the Debian snapshot that matches the base image. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> --- support/docker/Dockerfile | 7 +++++++ support/docker/apt-sources.list | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 support/docker/apt-sources.list