mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-14 02:42:30 +00:00
Updated Docker usage instructions (markdown)
@@ -1,3 +1,5 @@
|
||||
Docker distribution of DiscordChatExporter provides a way to run the app in a virtualized and isolated environment, without having to install any prerequisites. Only the CLI flavor of DiscordChatExporter is available in Docker because it does not provide the means for interacting with GUI applications.
|
||||
|
||||
### Pulling
|
||||
|
||||
This will download the [Docker image from the registry](https://hub.docker.com/r/tyrrrz/discordchatexporter) to your computer. You can run this command again to update when a new version is released.
|
||||
@@ -5,9 +7,15 @@ This will download the [Docker image from the registry](https://hub.docker.com/r
|
||||
```
|
||||
docker pull tyrrrz/discordchatexporter:stable
|
||||
```
|
||||
Note the `:stable` tag. It is not recommended to run the `:latest` docker releases since they are unstable.
|
||||
|
||||
> Only the CLI version is available in Docker.
|
||||
Note the `:stable` tag. DiscordChatExporter images are tagged according to the following patterns:
|
||||
|
||||
- `stable`: Latest stable version release, maps to latest GitHub release. This tag is updated with release of each new version. This is recommended for personal use.
|
||||
- `latest`: Build from latest commit, maps to latest CI build on GitHub. This tag is update with each new commit to `master` branch. This is not recommended, but you can use it if you want to try out some features that haven't been officially released yet.
|
||||
- `x.y.z` (e.g. `2.30.1`): Specific version release, maps to corresponding tag on GitHub. This tag is never updated once that version is released.
|
||||
Note the `:stable` tag. It is not recommended to run the `:latest` docker releases since they are unstable. This is recommended for use in automation workflows and similar environments.
|
||||
|
||||
You can see all available tags [here](https://hub.docker.com/r/tyrrrz/discordchatexporter/tags?page=1&ordering=last_updated).
|
||||
|
||||
### Usage
|
||||
|
||||
@@ -16,21 +24,18 @@ To run the CLI in Docker and render help text:
|
||||
```
|
||||
docker run --rm tyrrrz/discordchatexporter:stable
|
||||
```
|
||||
<br>
|
||||
|
||||
To export a channel:
|
||||
|
||||
```
|
||||
docker run --rm -v /path/on/machine:/app/out tyrrrz/discordchatexporter:stable export -t TOKEN -c CHANNELID
|
||||
```
|
||||
<br>
|
||||
|
||||
If you want colored output, real-time progress reporting, and some other stuff, pass `-it` (interactive) option:
|
||||
|
||||
```
|
||||
docker run --rm -it -v /path/on/machine:/app/out tyrrrz/discordchatexporter:stable export -t TOKEN -c CHANNELID
|
||||
```
|
||||
<br>
|
||||
|
||||
Note the `-v /path/on/machine:/app/out` option which instructs Docker to bind the `/app/out` directory inside the container to a path on your host machine. Replace `/path/on/machine` with the directory you want the files to be saved at.
|
||||
|
||||
@@ -43,25 +48,27 @@ docker run --rm -v /path/on/machine:/app/out:z tyrrrz/discordchatexporter:stable
|
||||
For more information, refer to the [Docker docs SELinux labels for bind mounts page](https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label).
|
||||
|
||||
You can also use the current working directory as the output directory by specifying:
|
||||
|
||||
* `-v $PWD:/app/out` in Mac/Linux
|
||||
* `-v $pwd.Path:/app/out` in PowerShell
|
||||
<br>
|
||||
|
||||
For more information, please refer to the [Dockerfile](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/Dockerfile) and [Docker documentation](https://docs.docker.com/engine/reference/run/).<br>
|
||||
To get your Token and Channel IDs, please refer to [this page](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs).
|
||||
|
||||
### Environment variables (advanced)
|
||||
### Environment variables
|
||||
|
||||
DCE.CLI accepts environment variables as fallbacks for the `--token` and `--bot` options.
|
||||
DiscordChatExpoter CLI accepts environment variables as fallbacks for the `--token` and `--bot` options.
|
||||
|
||||
- `DISCORD_TOKEN` to set the token
|
||||
- `DISCORD_TOKEN_BOT` to set whether it's a bot token (`true` or `false`)
|
||||
|
||||
You can use these variables either with the `--env` Docker option or with a combination of the `--env-file` Docker option and a `.env` file.
|
||||
Please refer to the Docker documentation for more information:<br>
|
||||
Please refer to the Docker documentation for more information:
|
||||
|
||||
* [Docker run - Set environment variables](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)
|
||||
|
||||
### Build Docker images (for arm on Raspberry Pi)
|
||||
### Build Docker images for arm on Raspberry Pi
|
||||
|
||||
If you use the Docker image on arm (for example Raspberry Pi), you'd build the image as below.
|
||||
|
||||
```bash
|
||||
@@ -81,13 +88,14 @@ mcr.microsoft.com/dotnet/sdk 5.0 72af6071941e 4 days ago
|
||||
mcr.microsoft.com/dotnet/runtime 3.1 6229bebd5a11 4 days ago 197MB
|
||||
```
|
||||
|
||||
In these images, two images (`tyrrrz/discordchatexporter:latest` and `mcr.microsoft.com/dotnet/runtime:3.1`) are required so you may delete the other two images.
|
||||
Among these, two images (`tyrrrz/discordchatexporter:latest` and `mcr.microsoft.com/dotnet/runtime:3.1`) are required so you may delete the other two images.
|
||||
|
||||
Now you can execute DiscordChatExporter.
|
||||
Now you can execute DiscordChatExporter:
|
||||
|
||||
```bash
|
||||
$ docker run --rm tyrrrz/discordchatexporter:latest
|
||||
```
|
||||
|
||||
##
|
||||
___
|
||||
|
||||
Special thanks to [@simnalamburt](https://github.com/simnalamburt) (dockerize) and [@Nimja](https://github.com/nimja) (better instructions)
|
||||
Reference in New Issue
Block a user