开源-Docker部署Cook菜谱工具

开源-Docker部署Cook菜谱工具

介绍

  • 开源Cook裁判员项目是以开源模式为基础的社区项目,其核心目标是为用户提供一个可自由交流、共享及获取食谱的场所。该平台允许用户自由选择食材厨具,并自动生成菜谱,每个菜谱都配有详细的视频流程。此项目鼓励食谱的共享、创新和探索,以便使更多的人在烹饪和分享美食的过程中得到益处

资源列表

操作系统配置主机名IP所需软件
CentOS 7.92C4Gcook192.168.93.101Docker最新版

基础环境

  • 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
  • 关闭内核安全机制
setenforce 0
sed -i "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
  • 修改主机名
hostnamectl set-hostname cook

一、安装Docker

  • 网络畅通的情况下,直接把下面内容全部复制到终端即可完成操作
# 安装依赖环境
yum install -y yum-utils device-mapper-persistent-data lvm2
# 添加CentOS官方镜像站
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum clean all && yum makecache
# 安装Docker
yum -y install docker-ce docker-ce-cli containerd.io
# 启动Docker
systemctl start docker
systemctl enable docker

二、配置加速器

  • 网络畅通的情况下,直接把下面内容全部复制到终端即可完成操作
cd /etc/docker/
cat >> daemon.json << EOF
{  
"registry-mirrors": ["https://8xpk5wnt.mirror.aliyuncs.com"]  
}
EOF
systemctl restart docker

三、查看Docker版本

[root@localhost ~]# docker version 
Client: Docker Engine - Community
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:32:04 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:31:02 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

四、拉取cook镜像

[root@cook ~]# docker pull yunyoujun/cook:latest
latest: Pulling from yunyoujun/cook
9398808236ff: Pull complete 
a4896b78e8db: Pull complete 
a352ab202530: Pull complete 
b9258afd0639: Pull complete 
8799ab366479: Pull complete 
07bc104f8702: Pull complete 
8afc9a751a90: Pull complete 
00bc879157ea: Pull complete 
Digest: sha256:da4cf3c9ff86d980475182353f699261931d479ffeda5b84fecd0a109745a98c
Status: Downloaded newer image for yunyoujun/cook:latest
docker.io/yunyoujun/cook:latest

五、部署cook菜谱工具

5.1、创建cook容器

[root@cook ~]# docker run -d --name cook --restart always -p 80:80 yunyoujun/cook
7c02ec1a6985b84e0c51ddbfde9c26f6d90517caf5924761457f0daf12e59fac

5.2、查看容器运行状态

[root@cook ~]# docker ps
CONTAINER ID   IMAGE            COMMAND                   CREATED          STATUS          PORTS                               NAMES
7c02ec1a6985   yunyoujun/cook   "/docker-entrypoint.…"   24 seconds ago   Up 24 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp   cook

5.3、查看cook容器日志

# 如果查看到的日志内容跟如下差不多没有明显错误,说明容器正常
[root@cook ~]# docker logs cook
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/06/11 23:52:44 [notice] 1#1: using the "epoll" event method
2024/06/11 23:52:44 [notice] 1#1: nginx/1.24.0
2024/06/11 23:52:44 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) 
2024/06/11 23:52:44 [notice] 1#1: OS: Linux 3.10.0-1160.71.1.el7.x86_64
2024/06/11 23:52:44 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/06/11 23:52:44 [notice] 1#1: start worker processes
2024/06/11 23:52:44 [notice] 1#1: start worker process 30
2024/06/11 23:52:44 [notice] 1#1: start worker process 31

六、访问cook菜谱服务

6.1、访问cook首页

  • 访问地址:http://IP(替换为自己的IP地址)
  • 我是随便点击的食谱,然后最下面的红色框里面就可以去看你选择的食谱制作视频
    在这里插入图片描述
  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值