Web lists-archives.com

Re: Recommended way to install Docker in Stretch




On 27/03/2019 12:59, Luís Gomes wrote:
> Hello everyone,
>
> I'm setting up a server with Debian Stretch and I need to install
> Docker.
>
> After reading the warning against installing software from unnoficial
> repositories from https://wiki.debian.org/DontBreakDebian I'm trying to
> follow this good advice.
>
> However, I could not find a docker.io package on the main stretch
> repository or in stretch-backports, which makes me ask what is the
> Debian-recommended-way to install Docker on Stretch?
>
>
> Thanks,
>
> Luís
>
>
Hi Luis

Firstly I am _not_ an expert at this,   I have recently, however
installed nextcloud into a docker instance.

using instructions from here

https://www.itzgeek.com/how-tos/linux/debian/how-to-install-docker-on-debian-9.html

However I did find that containers are stored in

/var/lib/docker

which caused a problem for me, as my / partition was small (about 30gb),
the rest of the system was /home

I re-installed debian and used / and /swap,  hence more space for the
containers.  As this is a home LAN system, it works fine for me.

I also found that restarting docker, also creates a new container each
time, problem as at the time I was testing next cloud, etc

I then found by using

docker run -d --restart="always" -p 8080:80 nextcloud

it started the same instance and the same container,

Before (I was'nt starting with '--restart="always"' and I ended up with
several containers, each time I restarted docker,  so my previous
container + user account were still there, just not loaded.    

Also found that

systemctl docker start

and

systemctl docker enable

the latter enables docker to start on boot, hence I can at least run the
docker / next cloud server headless (to a point at least)

Not sure if it is the recommended way though.

Hope this helps


Paul


-- 
Paul Sutton
http://www.zleap.net
https://www.linkedin.com/in/zleap/
gnupg : 7D6D B682 F351 8D08 1893  1E16 F086 5537 D066 302D