Docker image includes unneeded Ubuntu "restricted" (non-free) repo


(Andrew E) #1

Hello Discourse team,

I did a quick peek at /etc/apt/sources.list and found this list:

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe

The restricted repo contains non-free software.

I installed the vrms tool and after running it, it tells me that there are no proprietary packages in the docker image. The non-free restricted repo is primarily for those who want to install non-free drivers, so there should be no practical use of this repo by Discourse.

According to https://meta.discourse.org/t/does-the-discourse-team-distribute-proprietary-versions-of-discourse/87864/2, Discourse doesn’t distribute non-free software.

Could you please edit your sources.list file so that it does not open the door to accidentally installing packages from the restricted repository? I would really appreciate that. :slight_smile:

Thanks,
Andrew


(Rafael dos Santos Silva) #2

I believe this come from our upstream docker image, at this line

That line points to the official Ubuntu image from the Docker library which has this line:

where it adds this archive that contains the restricted lines you found.

I don’t know if there is an official Ubuntu docker image with those disabled.


(Andrew E) #3

Thanks for the links @Flaco. Does this line and those that follow override those settings?

https://github.com/discourse/discourse_docker/blob/master/image/base/Dockerfile#L15


(Rafael dos Santos Silva) #4

Oops, I totally missed that :blush:.

Yeah, so we are overwriting the Ubuntu defaults there.

Maybe try to build the image without the restricted bits and run the tests to see if everything pass?