FranzKafkaYu / x-ui

Lightweight Xray panel with multi-protocol and multi-user on the same port,supports English language and Telegram bot. Easy to use and easy to manage.
GNU General Public License v3.0
7.85k stars 1.57k forks source link

建议出一个使用docker-compose安装在docker运行的教程 #354

Open lixingbu-tal opened 1 year ago

lixingbu-tal commented 1 year ago

Welcome

Description of the problem,screencshot would be good

建议出一个使用docker-compose安装在docker运行的教程

Version of x-ui

```console $ x-ui version # Paste output here ```

x-ui log or xray log

```console # paste log here ```
bestmjj commented 1 year ago

Dockerfile

FROM debian:11-slim
WORKDIR /root
RUN apt-get update \
    && apt-get install -y --no-install-recommends -y ca-certificates  wget \
    && apt-get clean \
    && wget -O - https://github.com/FranzKafkaYu/x-ui/releases/download/0.3.4.2/x-ui-linux-arm64.tar.gz | tar -zxf - -C /tmp \
    && mv /tmp/x-ui/bin/ /root/ \
    && mv /tmp/x-ui/x-ui /root/ \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /tmp/x-ui/ 
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]

docker-compose.yaml

version: "3.8"
services:
  xui:
    build: ./
    network_mode: "host"
    volumes:
    - ./data/db:/etc/x-ui
    restart: always

运行

docker compose up -d
bigbighill commented 1 year ago

network_mode: "host" 网络模式可以是bridge 吗,我测试了好像不行

issueok commented 5 months ago

Dockerfile

FROM debian:11-slim
WORKDIR /root
RUN apt-get update \
    && apt-get install -y --no-install-recommends -y ca-certificates  wget \
    && apt-get clean \
    && wget -O - https://github.com/FranzKafkaYu/x-ui/releases/download/0.3.4.2/x-ui-linux-arm64.tar.gz | tar -zxf - -C /tmp \
    && mv /tmp/x-ui/bin/ /root/ \
    && mv /tmp/x-ui/x-ui /root/ \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /tmp/x-ui/ 
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]

docker-compose.yaml

version: "3.8"
services:
  xui:
    build: ./
    network_mode: "host"
    volumes:
    - ./data/db:/etc/x-ui
    restart: always

运行

docker compose up -d

启动后要怎么使用?