How to install docker on pureOS?


#1

Hi,

does anyone have installed docker on pureOS? if yes, did you only use the one in the official repo of purism which is a bit outdated or did you take the sources or other means?
Thanks in advance


#2

apt install docker.io gives me a very recent docker. (18.09.1)

That doesn’t have the security fix from a couple weeks back, but it’s quite recent.

I don’t know how to install the official docker-ce packages.


#3

Good to know thanks i didn’t try to look into the pure repo


#4

I just went through this and found that since PureOS is based on Debian, you can follow the instructions in the Docker CE for Debian page with a minor change.

In the “Setup the Repository” section it includes this command:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"

Since PureOS/green isn’t directly supported you need to remove the $(lsb_release -cs) part and replace it with stretch. The resulting command is:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   stretch \
   stable"

You can then continue to sudo apt-get update and sudo apt-get install docker-ce docker-ce-cli containerd.io. Following that you should be able to run:

$ sudo docker run hello-world