Skip to content

Latest commit

 

History

History
132 lines (105 loc) · 4.84 KB

install_manual_linuxos.md

File metadata and controls

132 lines (105 loc) · 4.84 KB

Install on LinuxOS

Container Engine

There are different container engine. But we recommend to use Docker. This guide shows your how to install Docker Engine (not Docker Desktop). This is a useful guide if you are using dflow on a cloud.

Download

Go to Docker official website to follow the official download guide: Get Docker

We will show you how to install Docker Engine on a Ubuntu platform: Install Docker Engine on Ubuntu

Install using the repository

This guide is copied from: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository.

Set up the repository

  1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:

    sudo apt-get update
    
    sudo apt-get install \
        ca-certificates \
        curl \
        gnupg \
        lsb-release
  2. Add Docker's official GPG key:

    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  3. Use the following command to set up the repository:

    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
      $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker Engine

  1. Update the apt package index, and install the latest version of Docker Engine, containerd, and Docker Compose, or go to the next step to install a specific version:

    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

    Receiving a GPG error when running apt-get update?

    Your default umask may not be set correctly, causing the public key file for the repo to not be detected. Run the following command and then try to update your repo again: sudo chmod a+r /etc/apt/keyrings/docker.gpg.

  2. To install a specific version of Docker Engine, list the available versions in the repo, then select and install:

    a. List the versions available in your repo:

    apt-cache madison docker-ce
    
    docker-ce | 5:20.10.16~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
    docker-ce | 5:20.10.15~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
    docker-ce | 5:20.10.14~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
    docker-ce | 5:20.10.13~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages

    b. Install a specific version using the version string from the second column, for example, 5:20.10.16~3-0~ubuntu-jammy.

    sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io docker-compose-plugin

Verify the installation

Run the hello-world official image to verify the installation.

docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.

Kubernetes

To use kubernetes, we can install minikube, a local kubernetes.

Before installation

Check if you are the root user. Minikube does not allow root user to start. Follow the following guide to add a user. See the original issue here: kubernetes/minikube#7903

Add new user

adduser developer 
#add the user. Follow the prompt
usermod -aG sudo developer

Login to the newly created user

su - developer

Add user to the Docker Group

sudo groupadd docker
sudo usermod -aG docker $USER
- Re-Login or Restart the Server

Download

Up-to-date version

Go to minikube official website to download: Minikube

Older version

NOTE: this is the recommended route for users in China. The minikube image repository for the up-to-date version is not correct, which leads to minikube start failure.

Command to install minikube older version (1.25.2)

curl -o minikube -L https://registry.npmmirror.com/-/binary/minikube/v1.25.2/minikube-linux-amd64

Install

Install you downloaded minikube to /usr/local/bin:

sudo install minikube /usr/local/bin/minikube

Verify the installation

minikube version