# Docker build failed on installing ffmpeg using a apt.txt config file

**URL:** <https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515>\
**Category:** Binder\
**Tags:** help-wanted\
**Created:** [June 8, 2022, 12:13pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515 "2022-06-08T12:13:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jekyll-one](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jekyll-one/32/7015_2.png) [@jekyll-one](https://discourse.jupyter.org/u/jekyll-one)\
**Post date:** [June 8, 2022, 12:13pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515/1 "2022-06-08T12:13:31Z")

</div>

Hi there,

I created a [Binder repo](https://github.com/jekyll-one/j1-binder-repo) based on a requirements file. Additionally, a apt file is used to install the **ffmpeg** package for the OS to be used later for notebooks using mathplotlib animations.

The first build 6 days ago was successful. Today, I’d to update some notebook files and the build process fails like so:

```auto
Step 39/52 : RUN apt-get -qq update && apt-get install --yes --no-install-recommends ffmpeg && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*
 ---> Running in cf0906dbc3f5
W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports InRelease' is not signed.
Removing intermediate container cf0906dbc3f5
The command '/bin/sh -c apt-get -qq update && apt-get install --yes --no-install-recommends ffmpeg && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*' 
returned a non-zero code: 10
Failed to connect to event stream

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [June 8, 2022, 2:39pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515/2 "2022-06-08T14:39:47Z")

</div>

I think what you posted above is a red herring. I just made and built a repo installing ffmpeg via `apt.txt` in the last two days and [it works](https://github.com/fomightez/ffmpeg-python-binder).

One thing I was seeing with launches from your binder badge were giving a bad ref. Did you change something and not update the badge?  
Try the following URL I got from using the form at [MyBinder.org](http://MyBinder.org) by putting in your details and you’ll see it builds and launches:

```nohighlight
https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/HEAD

```

And running `ffmpeg` in the terminal gives a brief amount of information about the version and configuration.

---

<div class="post-metadata">

**Author:** ![jekyll-one](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jekyll-one/32/7015_2.png) [@jekyll-one](https://discourse.jupyter.org/u/jekyll-one)\
**Post date:** [June 8, 2022, 3:44pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515/3 "2022-06-08T15:44:31Z")

</div>

Thanks for your reply.

I wrote:

> [@jekyll-one](#):
>
> The first build 6 days ago was successful

That means using an apt file to build a Docker image at Binder is **not** an general issue. That’s why I pleased for an idea.

I cannot understand why you see my post as a **red herring**. My intention posting here **my** experiences using the services at Binder is not to bring anyone the wrong way. The failures I posted are real log entries taken from the build logs. No fake. What I’m posting is my user experience to get some help **and** to give feedack for improvements.

I’ve read a bit more about the infrastructure _[binder.org](http://binder.org)_ is using and found at the [status page](https://mybinder.readthedocs.io/en/latest/about/status.html) in section **Federation status** four organisations supporting Binder for their free BinderHub service. Potentially, one out of the four may have issues in their infrastructure that caused **my** repo to fail for a build.

Yes, I’ve changed my repo today, as I said. The build process was **successful** later the the day at GKE. And I corrected the README of my repo for correct links and badges.

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [June 8, 2022, 5:57pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515/4 "2022-06-08T17:57:31Z")

</div>

I totally meant the code block & `Failed to connect to event stream` wasn’t really pointing to the issue. That was a ‘red herring’, meaning I don’t see it as being the cause of not being able to get your repo to build and launch. Sorry for the misunderstanding.

To make it clear. Hiccups that come up sometimes don’t end up being clear about what is going on. Often you’ll get the `Failed to connect to event` and later it will work just fine, after some time. And unless something changed in your `apt.txt`, the issue concerning `bionic-security` part isn’t in your hands. In other words, unless you changed something in the configuration file and then you got errors, it is probably something that will sort itself out if you try again later or get a different federation member to launch from. Similar to the API stuff you saw in your [other post](https://discourse.jupyter.org/t/rate-limit-exceeded-try-again-in-3600-seconds/14516).

---

<div class="post-metadata">

**Author:** ![jekyll-one](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jekyll-one/32/7015_2.png) [@jekyll-one](https://discourse.jupyter.org/u/jekyll-one)\
**Post date:** [June 10, 2022, 7:54pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515/5 "2022-06-10T19:54:33Z")

</div>

Thanks again for the clarification and your help.

I’ve seen in the logs the message:

> [@jekyll-one](#):
>
> `Failed to connect to event stream`

quite often. BinderHub seems to be under heavy load. No wonder the service given for free is excellent and used by many people, I guess.

Am I right to see this issue as a (self-healing) hiccup if no config changes were made?

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [June 10, 2022, 8:13pm UTC](https://discourse.jupyter.org/t/docker-build-failed-on-installing-ffmpeg-using-a-apt-txt-config-file/14515/6 "2022-06-10T20:13:27Z")

</div>

Yes, the event stream disconnect-thing **alone** is usually simpler to fix. A lot of times that just means the log terminal you see when looking at the events got disconnected from somewhere between the source of it and your browser. It doesn’t take much for that to happen. Usually you can get it right back by refreshing.  
Lately though there’s been a lot of activity and some of the member locations, aside from Gesis, not interacting with `apt` well.
