Docker - 部署抓包/host代理工具 Whistle
编写 Dockerfile
FROM alpine
EXPOSE 8899
RUN apk add --no-cache nodejs npm \
&& npm install whistle -g \
&& apk del npm \
&& mkdir /whistle
ENTRYPOINT ["w2", "run", "-M","prod", "-D","/whistle"]
构建镜像
$ docker build -t whistle:v1 .
启动容器
$ docker run -d --name whistle -p 8899:8899 whistle:v1
或者使用 docker-compose 启动,编写 yml 文件
version: "3"
services:
whistle:
image: whistle:v1
container_name: whistle
restart: always
volumes:
- "/volume/whistle:/whistle"
- "/volume/whistle/.WhistleAppData:/root/.WhistleAppData"
ports:
- "8899:8899"