Skip to content

Commit

Permalink
Update README-docker.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Feb 24, 2020
1 parent 8ed0a62 commit 5d144c3
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
# assume your configuration file name is `newpref.ini`
curl -F "@data=newpref.ini" http://localhost:25500/updateconf?type=form&token=password
# 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
```

0 comments on commit 5d144c3

Please sign in to comment.