-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Conversation
|
||
# Install Java. | ||
RUN echo "deb http://http.debian.net/debian jessie-backports main" >>/etc/apt/sources.list | ||
RUN apt-get update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this update was previously necessary because of the rm -rf /var/lib/apt/lists/*
immediately proceeding it--so this change should make the build a bit faster too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure updating is just necessary after a new source is added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brendan-ai2 look earlier in the Dockerfile. We no longer need to add a new source (since we're on stretch) and we no longer need to update here because we do earlier. An update would have been required for all installs after rm -rf /var/lib/apt/lists/*
, so the previous iteration of this Dockerfile was inefficient (it would create the apt lists, nuke them, and then recreate them).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My last comment wasn't particularly clear. My point was just that the previous Dockerfile should have been reorganized so the jdk install happened before the caches were cleared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, reorganizing would have been ideal. At any rate, thanks again for fixing this!
I tested
|
Dockerfile
Outdated
@@ -30,13 +30,8 @@ RUN apt-get update --fix-missing && apt-get install -y \ | |||
libxrender1 \ | |||
wget \ | |||
libevent-dev \ | |||
build-essential && \ | |||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably here to keep down the size of the image, right? See https://askubuntu.com/questions/179955/var-lib-apt-lists-is-huge for instance. Should we retain this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we should. In fact, I didn't mean to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, @schmmd. Left a minor comment. LGTM after that!
thx to danielkingai2 for finding it. |
That's my understanding. Though if you need to urgently get something working, you could pull down this PR and build the |
@kyleclo we push image per commit, so you wouldn't need to build your own image. See https://hub.docker.com/r/allennlp/commit/tags. But it's preferable to be on a release since we know more about releases than commits. |
Quick sanity check - did you try it with |
@matt-gardner For example, see:
|
@kyleclo found that
jessie
gave up support for their apt package so, when using our Docker image, they needed to add the following as a work-around. I didn't realize there was a newer stable release of Debian (stretch
) but now that I do I'm upgrading to it.See https://unix.stackexchange.com/questions/508724/failed-to-fetch-jessie-backports-repository for more details about the deprecation of apt repositories for
jessie
.