-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mita 可以使用 docker 部署吗 #165
Comments
可以。 如果在外面编译好 mita 然后复制进容器,请参考下面的命令添加用户名和用户组。 mieru/test/deploy/httptest/Dockerfile Line 32 in d035bcc
如果在容器里面编译,建议使用 golang 容器编译 mita 然后再复制到下一个容器里面,并且添加用户名和用户组。 |
谢谢作者的回复 我把我的实现过程写下来 可以给别人看看 先把本项目git clone下来 进入文件夹内
然后将这个二进制文件放进Alpine容器内 Dockerfile:
run.sh:
docker-compose.yml:
mita.json:
修改mita.json 然后docker compose up -d就能用了 NekoBoxForAndroid 使用v3.6.0的mieru插件 而不是v2.2.0 |
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git
RUN git clone https://github.com/enfein/mieru.git /build
WORKDIR /build
RUN go mod tidy
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GOCC=musl-gcc go build -ldflags="-s -w" -o mita cmd/mita/mita.go
FROM alpine AS base
COPY --from=builder /build/mita /usr/local/bin/
WORKDIR /app
COPY . .
RUN chmod +x ./start.sh && adduser -H -D -g "" mita && mkdir -p /etc/mita
CMD ["./start.sh"]
#!/bin/sh
set -e
mita run &
sleep 2
mita apply config ./conf/config.json
mita start
mita describe config
wait -n
|
我想使用docker 部署mita
README没有给docker镜像地址
hub.docker.com上也没有
我试图自己编译项目 但是无法运行
我想在Alpine上运行mita
容器内没有systemctl 也没有办法使用mita用户登陆
The text was updated successfully, but these errors were encountered: