mirror of
https://github.com/Kakune55/Pixel.git
synced 2025-09-16 04:09:33 +08:00
添加了DockerFile
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/data
|
||||
user.json
|
||||
自动交叉编译.cmd
|
||||
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM debian
|
||||
ADD ./ /app
|
||||
WORKDIR /app
|
||||
EXPOSE 9090
|
||||
ENTRYPOINT ["/app/main"]
|
22
README.md
22
README.md
@@ -25,3 +25,25 @@ id 图片id
|
||||
|
||||
## 使用的外部库
|
||||
"github.com/disintegration/imaging" MIT LICENSE
|
||||
|
||||
# 部署
|
||||
## 直接部署
|
||||
- 确保本机拥有go环境
|
||||
- 确保网络良好
|
||||
~~~bash
|
||||
git clone https://github.com/Kakune55/Pixel.git #克隆存储库
|
||||
cd ./Pixel #进入工作目录
|
||||
go build main.go #编译
|
||||
./main #运行
|
||||
~~~
|
||||
## 使用Docker (仅支持Linux-X86_64)
|
||||
### 导入镜像
|
||||
~~~bash
|
||||
wget https://github.com/Kakune55/Pixel/releases/download/v1.0/pixel.tar.gz #版本号仅供参考
|
||||
tar -zxvf pixel.tar.gz #解压
|
||||
docker load pixel.tar #导入镜像
|
||||
~~~
|
||||
### 运行容器
|
||||
~~~bash
|
||||
docker run -d -p <你需要的端口号>:9090 --name:pixel pixel
|
||||
~~~
|
Reference in New Issue
Block a user