Skip to content

Instantly share code, notes, and snippets.

@zeeshanalisyed
Last active July 10, 2021 07:50
Show Gist options
  • Select an option

  • Save zeeshanalisyed/d4ddc5c1f9f9b7ac0a5cbf9a500d14fd to your computer and use it in GitHub Desktop.

Select an option

Save zeeshanalisyed/d4ddc5c1f9f9b7ac0a5cbf9a500d14fd to your computer and use it in GitHub Desktop.
Rancher Installation with Docker

Instruction for docker

  • Pre-Installation Steps
    • basic steps

      $ sudo apt update
      $ sudo apt-get install \
        apt-transport-https \
        ca-certificates \
        curl \
        gnupg \
        lsb-release
      $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    • Arhcitectiure based steps

      • x86_64 / amd64
        $ echo \
          "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \         https://download.docker.com/linux/debian \
        $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
      - armhf
         ```bash
         $ echo \
        "deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \       https://download.docker.com/linux/debian \
        $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
         ```
      - arm64
         ```bash
         $ echo \
          "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \ https://download.docker.com/linux/debian \
        $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
         ```
      
  • update
    $ sudo apt-get update
  • install
    $ sudo apt-get install docker-ce docker-ce-cli containerd.io
  • test
    • execute: command should work without any errors it should pull the docker image hello-world
      $ sudo docker run hello-world

Rancher Installation Initial

  • Pre-step
    $ sudo sysctl net/netfilter/nf_conntrack_max=131072
  • basic install
    $ sudo docker run -d --restart=unless-stopped \
    -p 80:80 -p 443:443 \
    --privileged \
    rancher/rancher:latest
  • inital test: access {server ip} with http to confirm the installation
  • set admin password on the admin ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment