mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Update README-docker.md
This commit is contained in:
parent
8ed0a620fd
commit
5d144c32a4
@ -11,9 +11,32 @@ curl http://localhost:25500
|
|||||||
# if you see `subconverter vx.x.x backend` then the container is up and running
|
# if you see `subconverter vx.x.x backend` then the container is up and running
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to update `pref.ini` inside the docker, you can use the following command:
|
If you want to update `pref` configuration inside the docker, you can use the following command:
|
||||||
```bash
|
```bash
|
||||||
# assume your configuration file name is `newpref.ini`
|
# assume your configuration file name is `newpref.ini`
|
||||||
curl -F "@data=newpref.ini" http://localhost:25500/updateconf?type=form&token=password
|
curl -F "@data=newpref.ini" http://localhost:25500/updateconf?type=form&token=password
|
||||||
# you may want to change this token in your configuration file
|
# you may want to change this token in your configuration file
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For those who want to use their own `pref` configuration and/or rules, snippets, profiles:
|
||||||
|
```txt
|
||||||
|
# you can save the files you want to replace to a folder, then copy it into to the docker
|
||||||
|
# using the latest build of the official docker
|
||||||
|
FROM tindy2013/subconverter:latest
|
||||||
|
# assume your files are inside replacements/
|
||||||
|
# subconverter folder is located in /base/, which has the same structure as the base/ folder in the repository
|
||||||
|
COPY replacements/ /base/
|
||||||
|
# expose internal port
|
||||||
|
EXPOSE 25500
|
||||||
|
# notice that you still need to use '-p 25500:25500' when starting the docker to forward this port
|
||||||
|
```
|
||||||
|
Save the content above to a `Dockerfile`, then run:
|
||||||
|
```bash
|
||||||
|
# build with this Dockerfile and tag it subconverter-custom
|
||||||
|
docker build -t subconverter-custom:latest .
|
||||||
|
# run the docker detached, forward internal port 25500 to host port 25500
|
||||||
|
docker run -d -p 25500:25500 subconverter-custom:latest
|
||||||
|
# then check its status
|
||||||
|
curl http://localhost:25500
|
||||||
|
# if you see `subconverter vx.x.x backend` then the container is up and running
|
||||||
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user