目录
  1. 1. 安装
  2. 2. 测试
  3. 3. 管理
    1. 3.1. 重命名镜像
    2. 3.2. 查看docker进程
    3. 3.3. 停止容器进程
    4. 3.4. 启动容器进程
    5. 3.5. 重启容器进程
CTFd 比赛平台的搭建

开源项目地址 https://github.com/CTFd/CTFd

安装

建议在docker里面搭建,环境不会冲突。docker安装教程

安装完docker之后,可用以下命令

1
docker run -p 8000:8000 -it ctfd/ctfd

但是安装的太慢,不用官方的镜像,这里建议用阿里云公开的容器镜像,只用如下两条命令即可。

1
docker pull registry.cn-hangzhou.aliyuncs.com/capeic_sbw/ctfd:1.0

安装镜像之后起个容器

1
docker run -p 8000:8000 -it registry.cn-hangzhou.aliyuncs.com/capeic_sbw/ctfd:1.0

测试

在物理机访问 0.0.0.0:8000 即可,第一次登陆设置管理员账号密码,下图是已经设置过的

管理

重命名镜像

1
docker tag ctfd:latest registry.cn-hangzhou.aliyuncs.com/capeic_sbw/ctfd:1.0

查看docker进程

1
2
3
4
5
6
7
8
$docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d9f5eefb8d62 pwn_deploy_chroot:latest "/service.sh" 6 days ago Exited (255) 5 days ago 0.0.0.0:10000-10003->10000-10003/tcp pwn_deploy_chroot
846ac8b76082 pwn_docker:16.04 "/start.sh" 10 days ago Exited (255) 9 days ago 0.0.0.0:9997->9999/tcp musing_leakey
fd531742a5a3 ctfd:latest "/opt/CTFd/docker-en…" 11 days ago Up 8 seconds 0.0.0.0:8000->8000/tcp affectionate_khayyam
36aeab92fea7 registry.cn-hangzhou.aliyuncs.com/liujunjie/angr "/bin/sh -c 'su - an…" 12 days ago Exited (255) 2 days ago mystifying_ardinghelli
833d79e2e12e ctf "/bin/sh -c 'exec /b…" 4 months ago Exited (130) 4 months ago epic_sutherland
a55693666b02 ctf "/bin/sh -c 'exec /b…" 4 months ago Exited (143) 4 months ago

停止容器进程

1
docker stop fd53

启动容器进程

1
docker start fd53

重启容器进程

1
docker restart fd53
文章作者: nocbtm
文章链接: https://nocbtm.github.io/2019/10/14/CTFd-比赛平台的搭建/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 nocbtm's Blog
打赏
  • 微信
  • 支付宝