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.1API version: 1.26Package version: docker-1.13.1-162.git64e9980.el7.centos.x86_64Go version: go1.10.3Git commit: 64e9980/1.13.1Built: Wed Jul 1 14:56:42 2020OS/Arch: linux/amd64Server:Version: 1.13.1API version: 1.26 (minimum version 1.12)Package version: docker-1.13.1-162.git64e9980.el7.centos.x86_64Go version: go1.10.3Git commit: 64e9980/1.13.1Built: Wed Jul 1 14:56:42 2020OS/Arch: linux/amd64Experimental: 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 登录: