Trying to update Docker on DigitalOcean; stuck on Docker 19.03.13 šŸ˜”

Iā€™ve tried following other (closed) threads on here re: updating Docker, but every approach Iā€™ve tried fails for one reason or another.

Like many others here, Iā€™m running Discourse on a DigitalOcean Droplet. But I am unable to update to 20.10.0 (or, ideally, 24.0.7).

Just hoping to find some direction so I can update Docker from the command prompt. Thank you!

More context: When I try Jayā€™s solution, I receive the following errors:

E: Malformed entry 58 in list file /etc/apt/sources.list (URI parse)
E: The list of sources could not be read.

Curiously, this error repeats 3 times. (Perhaps because Iā€™ve tried to do this too many times and have installed multiple flawed versions of the same thing? If so, Iā€™ve no idea how to clean that upā€¦)

This is looking more and more like I need to update Ubuntu, but I am having trouble with that as well.

If I type apt update, I still receive the malformed entry 58 error.

You can search for that error and get some ideas.

Your OS is out of date. Your sources.list is out of date. You need to upgrade your server. I would recommend that you move to a new one.

Itā€™s possible that you have a new OS (but thatā€™s unlikely since thatā€™s a very old Docker, circa 2021) and that somehow something messed up that file.

If you donā€™t want to upgrade your OS, you donā€™t want to upgrade Discourse.

This is what I have been doing, both in this forum and beyond.

I am happy to do this, but I am running into an issue with the malformed entry 58 error. Could the issue be that my server is not running https and the sources.list file only has http references?

If I can get past this step, I can upgrade the OS. Problem is, I donā€™t know how to get past where Iā€™m at now.

Sorry. My recommendation is that you spin up a new server that works and is already upgraded. Itā€™s foolproof, faster, and safer. See Move a Discourse site to another VPS with rsync

1 Like

nano /etc/apt/sources.list and remove that line. You, or some script has added bad line there.

I may end up doing thisā€”even though it sounds like it will chew up a couple of daysā€”but I struggle to believe that itā€™s simpler than just updating Ubuntu on this Droplet.

With all the people here running Discourse on Droplets, thereā€™s no known way to get over this hurdle?

It will chew up fewer days than trying to run dist upgrade

Can I use DOā€™s ā€œCreate from Snapshotā€ functionality? Or will that just put the same, tired OS on my new Droplet?

Here are the last few lines of that file. Readout says ā€œRead 59 lines,ā€ so is line 58 the last one or the one before it?

Neither line looks messed up to me, so Iā€™m not sure what to deleteā€¦

Donā€™t struggle :smirk: Iā€™ve done both. Timewise starting new one is faster, but you must add ssh keys to get rsync working. It takes few minutes, if youā€™ e never done it before ā€” but it is easy.

Upgrading Ubuntu takes longer, because you must take snapshot before. After that there is plenty of questions, mostly about configurations, and those takes some times too to make your mind (use old ones is my advise if you take that road). But you canā€™t totally sure if something old is left behind.

2 Likes

I would wonder what those backports are. Comment those last lines and try. Because you have done snapshot all you loose is time.

The only time upgrading of Ubuntu didnā€™t work for me happened on DO, though.

edit

I checked my VPS in DO, and it has those backports too. So those must be some custom from DO.

No, you canā€™t. It creates 1:1 copy.

2 Likes

Ok, that was NOT the end of the file, and I removed the line that got added while I was fiddling with the installation. Gonna try some of these tutorials again.

Upgraded Ubuntu and Docker, but now my site says ā€œThe site canā€™t be reached.ā€

Not sure what the next step in the troubleshooting process ought to be; attempting to check out docker logs now.

This means nothing to me, but maybe it means something to one of you:

Aaaand now itā€™s a 502 error.

Ran the launcher rebuild again, and the forums are back up :sunglasses:

Thatā€™s awesome! Congrats! Glad you got it fixed!

I marked your ā€œupgradedā€ post as the solution. That was the real fix, even though you needed to do one more rebuild.

3 Likes