Docker non funziona su Ubuntu 16.04?

Il mio Docker è rotto quando ho provato ad aggiornare Docker Manager tramite l’interfaccia web. So che la mia installazione Docker è danneggiata perché ho seguito la raccomandazione di Sam e ho ottenuto questo:

$ docker run -it --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:9572f7cdcee8591948c2963463447a53466950b3fc15a247fcad1917ca215a2f
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: no status provided on response: unknown.
ERRO[0003] error waiting for container: context canceled

Ho poi trovato questa issue su GitHub che sembra corrispondere a ciò che sto riscontrando:

Dato che sto usando Ubuntu 16.04, sembra che questa sia la soluzione:

  1. Aggiungi un repository deb:
sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu xenial-security main universe'
  1. Installa runc (nota i caratteri ~, GitHub li ha rovinati nel post originale di @vietthang207):
sudo apt-get install runc=1.0.0~rc7+git20190403.029124da-0ubuntu1~16.04.4
  1. L’installazione di runc causa la rimozione di docker-ce, quindi reinstallalo:
sudo apt-get install docker-ce

Qualcuno può confermare che sia sicuro procedere in questo modo o quali saranno le conseguenze? Sono un po’ preoccupato che ciò disinstalli Docker. Immagino che significhi che il mio sito sarà offline durante il processo (stranamente, è attualmente ancora attivo e funzionante, nonostante Docker sia rotto). Ma la mia installazione di Discourse è al sicuro o anche i miei container scompariranno?

Modifica: ecco fino a dove ho osato arrivare:

$ sudo apt-get install runc=1.0.0~rc7+git20190403.029124da-0ubuntu1~16.04.4
[sudo] password per christoph:
Reading package lists... Done
Building dependency tree
Reading state information... Done
I seguenti pacchetti sono stati installati automaticamente e non sono più necessari:
  aufs-tools cgroupfs-mount docker-ce-cli libltdl7
Usa 'sudo apt autoremove' per rimuoverli.
I seguenti pacchetti verranno RIMOSSI:
  containerd.io docker-ce
I seguenti NUOVI pacchetti verranno installati:
  runc
0 aggiornati, 1 nuovi installati, 2 da rimuovere e 21 non aggiornati.
1 non completamente installato o rimosso.
È necessario scaricare 1.890 kB di archivi.
Dopo questa operazione, 192 MB di spazio su disco saranno liberati.
Vuoi continuare? [Y/n] n
Operazione annullata.
$\n~~~~
1 Mi Piace

Have you rebooted? I’ve had trouble with Docker if I’ve done an upgrade and didn’t reboot.

Yeah. That’s scary-sounding. I know that I have sites on 16.04 and know that I haven’t done anything with runc.

If you’re concerned about down time and you’re on Digital Ocean, you might just

  1. spin up a new droplet with 18.04 and do a clean install.
  2. Get an floating IP, point it at the old server, and point DNS there.
  3. Put the old forum in read-only
  4. back up
  5. restore to the new server
  6. re-point the floating IP to the new server.

You’ll have no down time and just the read-only time it takes to back up and restore. You can practice a time or two before you do the read-only bit. You could also rsync uploads rather than including them in the backup, so you’d need to backup/restore just the database.

You’d probably want to pull over your existing let’s encrypt certs too, though, or, I think, you’ll have to rebuild to get them.

2 Mi Piace

I was contemplating it but decided against it as I thought that since my docker installation is apparently broken but my forum still works, rebooting the server might also break the forum. What are the chances? Should I try rebooting?

Thanks for your explanation for minimising downtime. But no, I’m not on DO. But downtime is not a problem at all as long as I know it wont be for many hours or days.

If you upgraded Docker, it’s still installed, and this problem appeared when you upgraded, then I’m pretty sure that rebooting will solve your problem. Note: Free advice is worth what you pay for it. :wink:

Make a backup before you reboot. Worst case, with a backup and your app.yml you can spin up a new server and start anew in under an hour (unless you have 10s of GB of data, perhaps).

My plan would likely work for a number of hosting services.

If you’re super paranoid you could spin up a new server somewhere and pull a backup over there so if something went horribly wrong you’d have a fallback plan.

1 Mi Piace

I very much appreciate it.

Actually, I think it’s worth much more than that. But I understand what you’re saying.

To be precise:

  1. I tried to upgrade docker manager via the discourse web-interface and it failed (I posted the errors here)
  2. Then I tried . /launcher rebuild app but it failed and sent me to Troubleshoot docker installation issues
  3. I then realized that I probably should use a different command because I have separate data and web_only containers so I tried ./launcher bootstrap web_only but it gave me the same error.
  4. I followed the Troubleshoot docker installation issues instructions. The rest is in the OP.

I guess I’ll try rebooting this weekend when I have the time to fix possible follow problems. Because: no, although I have set up three discourse instances that was years ago and “spinning up a new server and starting anew” would probably keep me busy for an entire day. Pointing my domain at the new IP address alone would be a potential nightmare to accomplish. Or maybe not, but then finding out that it’s not a big deal would also take some time…

1 Mi Piace

Well, since I’ve spend hundreds of hours (much more time than if I’d just done “artisinal installations” provided by my predecessor) if you do know how to configure DNS, my installations are fully automated and take under an hour (most of the DNS propagation time).