mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 21:07:50 +08:00
添加Docker
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
|||||||
|
FROM python:3.8-alpine3.10
|
||||||
|
|
||||||
|
MAINTAINER milktea@vmoe.info
|
||||||
|
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
|
#RUN apk --no-cache add git
|
||||||
|
RUN apk --no-cache add git build-base libffi-dev libxml2-dev libxslt-dev libressl-dev
|
||||||
|
RUN git clone https://github.com/shmilylty/OneForAll
|
||||||
|
RUN pip install -r /OneForAll/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
|
WORKDIR /OneForAll
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/ash"]
|
||||||
+17
-1
@@ -70,7 +70,7 @@ Python 3.8.0
|
|||||||
pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python37\site-packages\pip (python 3.8)
|
pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python37\site-packages\pip (python 3.8)
|
||||||
```
|
```
|
||||||
|
|
||||||
**✔Installation steps**
|
**✔Installation steps (Git version)**
|
||||||
|
|
||||||
1. **Download**
|
1. **Download**
|
||||||
|
|
||||||
@@ -106,6 +106,22 @@ pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python37\site-packages
|
|||||||
git pull
|
git pull
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**✔Installation steps (Docker version)**
|
||||||
|
|
||||||
|
Method 1: directly pull the deployed image (not updated in time)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker pull tardis07/oneforall
|
||||||
|
docker run -it oneforall
|
||||||
|
```
|
||||||
|
|
||||||
|
Method 2: build from `Dockerfile` (same as git version)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build -t oneforall .
|
||||||
|
docker run -it oneforall
|
||||||
|
```
|
||||||
|
|
||||||
**✨Demonstration**
|
**✨Demonstration**
|
||||||
|
|
||||||
1. If you are installing dependencies through pip3, run the example using the following command:
|
1. If you are installing dependencies through pip3, run the example using the following command:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ Python 3.8.0
|
|||||||
pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python38\site-packages\pip (python 3.8)
|
pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python38\site-packages\pip (python 3.8)
|
||||||
```
|
```
|
||||||
|
|
||||||
**✔安装步骤**
|
**✔安装步骤(git 版)**
|
||||||
|
|
||||||
1. **下载**
|
1. **下载**
|
||||||
本项目已经在[码云](https://gitee.com/shmilylty/OneForAll.git)(Gitee)镜像了一份,国内推荐使用码云进行克隆比较快:
|
本项目已经在[码云](https://gitee.com/shmilylty/OneForAll.git)(Gitee)镜像了一份,国内推荐使用码云进行克隆比较快:
|
||||||
@@ -104,6 +104,22 @@ pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python38\site-packages
|
|||||||
git pull
|
git pull
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**✔安装步骤(docker 版)**
|
||||||
|
|
||||||
|
方法一:直接拉取部署好的镜像(更新不及时)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker pull tardis07/oneforall
|
||||||
|
docker run -it oneforall
|
||||||
|
```
|
||||||
|
|
||||||
|
方法二:从 `Dockerfile` 中构建(同git版)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build -t oneforall .
|
||||||
|
docker run -it oneforall
|
||||||
|
```
|
||||||
|
|
||||||
**✨使用演示**
|
**✨使用演示**
|
||||||
|
|
||||||
1. 如果你是通过pip3安装的依赖则使用以下命令运行示例:
|
1. 如果你是通过pip3安装的依赖则使用以下命令运行示例:
|
||||||
|
|||||||
Reference in New Issue
Block a user