11/23/2021»»Tuesday

Upgrade Docker Ubuntu

  1. Upgrade Docker Ubuntu Windows 10
  2. Upgrade Docker Ubuntu
  3. Docker Ubuntu Image

Docker Update Ubuntu Operating System. Remove old versions of Docker: apt-get remove docker docker-engine docker.io. If you are installing on Ubuntu 14.04, install the linux-image-extra package. Apt-get update -y apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual Install Docker engine prerequisites. For Ubuntu 16.04 and higher, the Linux kernel includes support for OverlayFS, and Docker CE uses the overlay2 storage driver by default. If you need to use aufs instead, you need to configure it manually. Sudo apt install docker-ce. This will install Docker, start the engine and configure it to always start on boot. After the installation is complete, verify that it is running. Sudo systemctl status docker. If installed successfully, the output will indicate that the service is active and running.

  1. $ docker-compose -version docker-compose version: 1.4.0 And $ docker -version Docker version 1.11.1, build 5604cbe When I try to update it, I get the following: $ sudo apt-get upgrade docker-engine Reading package lists. Done Building dependency tree Reading state information.
  2. Install Docker Compose on Ubuntu Repository. Ubuntu Repository will provide stable version and update for automationally. Sudo apt update. Then open your terminal and input command: sudo apt install docker-compose. It is take few minutes for downloading and installation. To verify version installation successfully on your system, by command.

I needed to upgrade Go recently on an Ubuntu server I was using to do some Packer builds. The golang version that was installed on my system was 1.10.4. I needed to go to a later version so that I could use the mod subcommand, which isn’t present in version 1.10.

Go is a compiled, statically typed programming language developed by Google. Many modern applications such as Docker and Kubernetes are written in Go.

This article will cover the steps I took to update Go to the later version. First of all you can check the version of Go you have installed by running:

This confirms that I am running go version 1.10.4. In order to update go, we first need to remove this version.

Note: As always, before proceeding with any steps listed in this article, ensure you have tested the process fully, and that you have a backup and restore plan in place – especially if you are working on a production system!

Remove the Existing Go Version

Ubuntu

The golang-go package can be removed by running the following series of commands:

These commands will remove the existing version of Go and it’s dependencies. Once done we can install the new version.

Install Go on Ubuntu

Docker

First of all we need to grab the correct install package for our system. These can be found here. I have chosen to use the latest version of Go, which at the time of writing is 1.15.5:

The package can be downloaded easily using wget:

Once the file is downloaded, the contents need to be extracted using unzip:

Next we want to move the extracted directory and it’s contents to /usr/local, which is the recommended location:

With that done, the next step is to set up some environment variables so that we can run Go easily. To do so, edit the .profile file, which can be found in the home directory. I used vim to do so:

The following lines need to be added:

Save the file once the changes have been made, then load these settings into the shell by running:

With that done, run go to check the version is as expected:

Upgrade Docker Ubuntu Windows 10

As you can see from the output, the desired version of Go is now installed. We can further test the go upgrade is working as expected by running a simple ‘hello world’ program.

Testing the Go Upgrade

Using your favourite text editor, create a new file named hello.go, which contains the following lines:

Save the file, then run it using the go run command:

Upgrade Docker Ubuntu

Upgrade

Docker Ubuntu Image

There we go! An upgraded and working Go on Ubuntu!

Most Viewed Posts