docker 安裝 superset

逃跑的沙丁魚發表於2020-09-30

1 系統環境:

[root@ds2 docker]# cat /etc/redhat-release 
CentOS Linux release 7.8.2003 (Core)
[root@ds2 ~]# python
Python 3.6.10 (default, Sep 30 2020, 17:39:57) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.


2 docker版本:

[root@ds2 docker]# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-162.git64e9980.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      64e9980/1.13.1
 Built:           Wed Jul  1 14:56:42 2020
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-162.git64e9980.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      64e9980/1.13.1
 Built:           Wed Jul  1 14:56:42 2020
 OS/Arch:         linux/amd64
 Experimental:    false

3 我現在的環境裡沒有superset

[root@ds2 docker]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@ds2 docker]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

4 搜尋superset

[root@ds2 docker]# docker search superset
INDEX       NAME                                            DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/amancevice/superset                   Superset on Debian+Python3                      249                  [OK]
docker.io   docker.io/preset/superset                       Apache Superset (incubating) is a modern, ...   19                   
docker.io   docker.io/tylerfowler/superset                  An extendable Docker image for Airbnb's Su...   17                   
docker.io   docker.io/maedamikio/superset                                                                   3                    
docker.io   docker.io/dailyhotel/superset                   Dockerized Superset                             2                    [OK]
docker.io   docker.io/ganshanshan/superset_tddv             tddv superset                                   2                    [OK]
docker.io   docker.io/huksley/superset                      AirBnB Superset 0.28 with MySQL driver          2                    [OK]

5 拉取映象到本地

這裡我拉取 docker.io/amancevice/superset  因為點贊最多249

[root@ds2 docker]# docker pull amancevice/superset

6 檢視當前包含在Docker內的映象

[root@ds2 docker]# docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
docker.io/amancevice/superset   latest              9e6888bfcef6        39 hours ago        1.89 GB

7 建立一個宿主機的目錄

地對映資料夾

mkdir -p /data/module/superset/conf #配置檔案
mkdir -p /data/module/superset/data  #資料

8  安裝superset例項

docker run --name superset -d -p 8088:8088 docker.io/amancevice/superset

 

9 檢視superset容器例項

[root@ds2 superset]# docker ps
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS                     PORTS                    NAMES
c200132fe6dd        docker.io/amancevice/superset   "gunicorn superset..."   7 minutes ago       Up 7 minutes (unhealthy)   0.0.0.0:9088->8088/tcp   liucf-superset

10 設定superset使用者名稱和密碼

[root@ds2 ~]# docker exec -it a2cdef2452d3 superset-init
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: 974953824@qq.com      
Password: 
Repeat for confirmation: 

11 登入: