Intro

So, check here for more Rancher 2.6 info. Ok, so Debian 11 (also should work for Ubuntu 22) does not work well due to so Docker and iptables settings that have to be adjusted. See here for that.

Setup

Step1: Configure Docker

Docker is critical to setting up Rancher. Note, there are more ways to setup Rancher2.6 but this is the quickest way to get it setup.

1-a: Run Docker Setup Script

Go to https://docs.docker.com/engine/install/debian/ to find the steps are to configure. Below, this should do what is critical to docker setup.

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Output should be like this…

# Executing docker install script, commit: 4f282167c425347a931ccfd95cc91fab041d414f
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
+ sh -c mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sh -c echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-scan-plugin >/dev/null
+ version_gte 20.10
+ [ -z  ]
+ return 0
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce-rootless-extras >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  8 23:12:08 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.18
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.6
  Git commit:       e42327a
  Built:            Thu Sep  8 23:09:59 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

================================================================================

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

    dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================

1-b: Fix User To Run Docker (Docker Post-Install Steps)

Here is dockers Post-Install Steps. However, here is a quick rundown of that process for Debian 11

sudo usermod -aG docker $USER
newgrp docker
docker run hello-world

Output should be…

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:62af9efd515a25f84961b70f973a798d2eca956b1b2b026d0a4a63a3b0b6a3f2
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Step 2: Install Rancher2.6

Now, it is time to install Rancher2.6 inside of Docker. For more, see Rancher Quick start. Anyway, below is what should be ran.

sudo docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher

Here is the output

da8dd2c40feb: Pull complete
73c1ef0a4922: Pull complete
efddafa85479: Pull complete
ac61a7c361bf: Pull complete
d5949a4bef4a: Pull complete
7ca1673535fb: Pull complete
f2d6805c47ac: Pull complete
e1872cd54758: Pull complete
89c4465aed96: Pull complete
3f41ce0c0da1: Pull complete
28954968ad6c: Pull complete
ee4a689c1273: Pull complete
8f1a2c9d03a5: Pull complete
88903dbe8450: Pull complete
0cf433ffa3e2: Pull complete
8f3aca527486: Pull complete
8fd2a9554a27: Pull complete
4b40a66d90f9: Pull complete
9c21e9efe8f1: Pull complete
2cf992db3fb5: Pull complete
Digest: sha256:ca685fa565a971858d05842d4a9e529dedd2813dc97cbec5253e56741a65e138
Status: Downloaded newer image for rancher/rancher:latest
ecd0ac0b0b3e139e36fa202fff3c51bc1f831d2acd1bcbbce8e428fe97d5cf66

Get Temp Password for Rancher2.6

docker logs  container-id  2>&1 | grep "Bootstrap Password:"
One thought on “Create Simple Rancher2.6 on Debian11”

Leave a Reply

Your email address will not be published. Required fields are marked *