docker 踩坑日记
加载本地配置文件
docker run -p 6379:6379 –name myredis -v E:\Docker\redis\redis.conf:/etc/redis/redis.conf -v E:\Docker\redis\data:/data -d redis redis-server /etc/redis/redis.conf –appendonly yes
启动报错
- Containers feature is disabled. Enable it using the PowerShell script (in an administrative PowerShell) and restart your computer before using Docker Desktop:
powershell:
Enable-WindowsOptionalFeature -Online -FeatureName $(“Microsoft-Hyper-V”, “Containers”) -All
- 【Docker】:Failed to set version to docker-desktop: exit code: -1
方案1 此操作会导致代理软件无法使用. 一般还需要重启电脑才生效. 略拉胯.
cmd:
netsh winsock reset
方案2 下载软件 https://zhaowudi.lanzoub.com/iKKHv0hm3ssj
cmd:
NoLsp.exe c:\windows\system32\wsl.exe
redis启动后外部无法访问
Error initializing Redis connection
Could not get a resource from the pool
Unexpected end of stream.
redis.conf 中 注释掉 # bind 127.0.0.1 -::1
rocketmq
程序启动
1 | @echo off |
可能遇到错误
- 错误: 找不到或无法加载主类 Files\Java\jdk1.8.0_202\jre\lib\ext
- Please set the ROCKETMQ_HOME variable in your environment!