当前位置:   article > 正文

开源-Docker部署Cook菜谱工具

开源-Docker部署Cook菜谱工具

开源-Docker部署Cook菜谱工具

介绍

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

资源列表

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

基础环境

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

一、安装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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

二、配置加速器

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

三、查看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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

四、拉取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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

五、部署cook菜谱工具

5.1、创建cook容器

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

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
  • 1
  • 2
  • 3

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

六、访问cook菜谱服务

6.1、访问cook首页

  • 访问地址:http://IP(替换为自己的IP地址)
  • 我是随便点击的食谱,然后最下面的红色框里面就可以去看你选择的食谱制作视频
    在这里插入图片描述
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号