How to install Apache Superset Docker Image on Linux CentOS7 that without internet

Step 1: Login Linux and check the CentOS version

[root@bigdatasmallteam ~]# whoami
root
[root@bigdatasmallteam ~]# free
              total        used        free      shared  buff/cache   available
Mem:       16247588     1266648    11102236      274164     3878704    14368600
Swap:       9957372           0     9957372
[root@bigdatasmallteam ~]#

How to Install Docker on Linux CentOS 7.9
Step 1: Check Linux CentOS version:
[root@bigdatasmallteam ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Step 2: Update the system in CentOS 7

[root@bigdatasmallteam ~]# sudo yum check-update
Loaded plugins: enabled_repos_upload, fastestmirror, package_upload, product-id, search-disabled-repos, subscription-manager,
              : tracer_upload, versionlock
Loading mirror speeds from cached hostfile
PwC_CentOS_7_Base                                                                                     | 2.1 kB  00:00:00
PwC_CentOS_7_Extras                                                                                   | 2.1 kB  00:00:00
PwC_CentOS_7_Updates                                                                                  | 2.1 kB  00:00:00
PwC_Docker_Docker-CE                                                                                  | 2.1 kB  00:00:00
PwC_EPEL_7_EPEL                                                                                       | 2.6 kB  00:00:00
PwC_EPEL_7_Supplementary_EPEL_Created_by_PwC                                                          | 2.1 kB  00:00:00
PwC_Foreman_1_22_Foreman_Client                                                                       | 2.1 kB  00:00:00
PwC_Foreman_2_1_Foreman_Client                                                                        | 2.1 kB  00:00:00
PwC_Microsoft_Linux_Software_Repository_7_prod                                                        | 2.1 kB  00:00:00

mdatp.x86_64                            101.53.02-1                            PwC_Microsoft_Linux_Software_Repository_7_prod
Uploading Enabled Repositories Report
Loaded plugins: fastestmirror, product-id, subscription-manager, versionlock
[root@bigdatasmallteam ~]#

Step 3: Get the docker compose from github

If the server can connect the github, then run below script. Otherwise, download the docker compose and then upload to the CentOS server.**

How to install Docker on Linux CentOS 7.9

[root@iZ2zehb3zobkh31kn9cuo2Z ~]# curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose

[root@bigdatasmallteam ~]# mkdir -p ~/.docker/cli-plugins/

Step 4: Download the Docker Compose

https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 on Windows

Upload docker-compose-linux-x86_64 to the server folder

[root@bigdatasmallteam ~]# pwd

/root

[root@bigdatasmallteam ~]# cp /home/CN_SSH_USER_02/docker-compose-linux-x86_64 /root/.docker/cli-plugins/

[root@bigdatasmallteam ~]# ls -l /root/.docker/cli-plugins/

total 24128

-rw------- 1 root root 24707072 Mar 3 13:33 docker-compose-linux-x86_64

[root@bigdatasmallteam ~]#

Install docker on Linux:

Docker Documentation – 16 Mar 22

Install Docker Engine

Lists the installation methods

Docker Documentation – 16 Mar 22

Install Docker Engine on CentOS

Instructions for installing Docker Engine on CentOS

[root@bigdatasmallteam ~]# sudo yum install docker-ce docker-ce-cli containerd.io
Loaded plugins: enabled_repos_upload, fastestmirror, package_upload, product-id, search-disabled-repos, subscription-manager, tracer_upload, versionlock
Loading mirror speeds from cached hostfile
PwC_CentOS_7_Base                                                                                                                          | 2.1 kB  00:00:00
PwC_CentOS_7_Extras                                                                                                                        | 2.1 kB  00:00:00
PwC_CentOS_7_Updates                                                                                                                       | 2.1 kB  00:00:00
PwC_Docker_Docker-CE                                                                                                                       | 2.1 kB  00:00:00
PwC_EPEL_7_EPEL                                                                                                                            | 2.6 kB  00:00:00
PwC_EPEL_7_Supplementary_EPEL_Created_by_PwC                                                                                               | 2.1 kB  00:00:00
PwC_Foreman_1_22_Foreman_Client                                                                                                            | 2.1 kB  00:00:00
PwC_Foreman_2_1_Foreman_Client                                                                                                             | 2.1 kB  00:00:00
PwC_Microsoft_Linux_Software_Repository_7_prod                                                                                             | 2.1 kB  00:00:00

mdatp.x86_64                                              101.53.02-1                                               PwC_Microsoft_Linux_Software_Repository_7_prod
Uploading Enabled Repositories Report
Loaded plugins: fastestmirror, product-id, subscription-manager, versionlock
[root@bigdatasmallteam ~]# sudo yum install docker-ce docker-ce-cli containerd.io
Loaded plugins: enabled_repos_upload, fastestmirror, package_upload, product-id, search-disabled-repos, subscription-manager, tracer_upload, versionlock
Loading mirror speeds from cached hostfile
PwC_CentOS_7_Base                                                                                                                          | 2.1 kB  00:00:00
PwC_CentOS_7_Extras                                                                                                                        | 2.1 kB  00:00:00
PwC_CentOS_7_Updates                                                                                                                       | 2.1 kB  00:00:00
PwC_Docker_Docker-CE                                                                                                                       | 2.1 kB  00:00:00
PwC_EPEL_7_EPEL                                                                                                                            | 2.6 kB  00:00:00

Step 5: Start Docker and check docker status

[root@bigdatasmallteam ~]# sudo systemctl start docker
[root@bigdatasmallteam ~]# sudo systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-03-03 13:43:38 HKT; 2min 16s ago
     Docs: https://docs.docker.com
 Main PID: 109474 (dockerd)
    Tasks: 7
   Memory: 31.2M
   CGroup: /system.slice/docker.service
           └─109474 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Mar 03 13:43:37 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:37.994893444+08:00" level=info msg="failed to read ipv6 net.ipv6.conf.<bridge>....accept_ra
Mar 03 13:43:37 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:37.994920496+08:00" level=info msg="failed to read ipv6 net.ipv6.conf.<bridge>....accept_ra
Mar 03 13:43:38 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:38.197460756+08:00" level=info msg="Loading containers: done."
Mar 03 13:43:38 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:38.254772674+08:00" level=info msg="Docker daemon" commit=459d0df graphdriver(s...=20.10.12
Mar 03 13:43:38 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:38.254901669+08:00" level=info msg="Daemon has completed initialization"
Mar 03 13:43:38 bigdatasmallteam systemd[1]: Started Docker Application Container Engine.
Mar 03 13:43:38 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:38.323577822+08:00" level=info msg="API listen on /var/run/docker.sock"
Mar 03 13:43:46 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:46.451376542+08:00" level=warning msg="Error getting v2 registry: Get \"https:/... by peer"
Mar 03 13:43:46 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:46.451424609+08:00" level=info msg="Attempting next endpoint for pull after err... by peer"
Mar 03 13:43:46 bigdatasmallteam dockerd[109474]: time="2022-03-03T13:43:46.460385769+08:00" level=error msg="Handler for POST /v1.41/images/create retu... by peer"
Hint: Some lines were ellipsized, use -l to show in full.

Step 6: Create a user superset_user for Apache superset.

[root@bigdatasmallteam ~]# whoami
root
[root@bigdatasmallteam ~]# sudo useradd superset_user
[root@bigdatasmallteam ~]# sudo usermod -aG docker superset_user


[root@bigdatasmallteam ~]# docker --version
Docker version 20.10.12, build e91ed57

Step 7: Check the docker hello-world.

[superset_user@bigdatasmallteam ~]$ whoami
superset_user
[superset_user@bigdatasmallteam ~]$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": read tcp 10.158.34.75:36406->54.86.228.181:443: read: connection reset by peer.
See 'docker run --help'.
[superset_user@bigdatasmallteam ~]$

This issue because this server cannot connect the internet (https://hub.docker.com).

Step 8: Download the hello-world docker image and apache superset docker image from https://hub.docker.com

Assuming we have another Linux on Aliyun that can download the docker images.

Download: docker hello-world
Docker Hub

Linux of Aliyun Server:

Download Hello-world docker image.

root@iZj6c746e7oevje00s2gumZ:~# docker -v
Docker version 20.10.12, build e91ed57

root@iZj6c746e7oevje00s2gumZ:~# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:4c5f3db4f8a54eb1e017c385f683a2de6e06f75be442dc32698c9bbe6c861edd
Status: Downloaded newer image for hello-world:latest
docker.io/library/hello-world:latest

root@iZj6c746e7oevje00s2gumZ
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值