赞
踩
文件内容如下:
FROM rabbitmq:3.9-management
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get update
RUN apt-get -o Acquire::Check-Date=false update && apt-get install -y curl
RUN curl -L https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.9.0/rabbitmq_delayed_message_exchange-3.9.0.ez > $RABBITMQ_HOME/plugins/rabbitmq_delayed_message_exchange-3.9.0.ez
RUN chown rabbitmq:rabbitmq $RABBITMQ_HOME/plugins/rabbitmq_delayed_message_exchange-3.9.0.ez
RUN rabbitmq-plugins enable rabbitmq_delayed_message_exchange
docker build -t rabbitmq .
docker run -d --hostname localhost --name rabbitmq -p 15672:15672 -p 5672:5672 --restart=always rabbitmq
注意这里启动的时候 把容器id改成 你镜像的id, 默认账号和密码是 guest guest
version: '3.1'
services:
rabbitmq:
restart: always
image: daocloud.io/library/rabbitmq:3.8.8-management
#设置映射的目录
volumes:
- ./data/:/var/lib/rabbitmq/
- ./log/:/var/log/rabbitmq/log/
ports:
- 15672:15672
- 5672:5672
environment:
# 设置时区
TZ: Asia/Shanghai
# 设置用于登录的用户名和密码
RABBITMQ_DEFAULT_USER: rabbit
RABBITMQ_DEFAULT_PASS: rabbit
延迟任务插件安装完成,在这里是可以看到 exchange的type多了个。
使用站长工具 查看github的ip是什么
站长工具
修改hosts文件
vim /etc/hosts
添加以下内容
githubip github域名
20.205.243.166 www.github.com
20.205.243.166 github.com
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。