Skip to content

Commit

Permalink
Specify the image name of the docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
Alee14 committed Feb 17, 2024
1 parent 5f7ea79 commit 4ce9851
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ docker build -t dlap .

Follow the guide below and when ready type the following
```bash
docker run -d -v <path to config>:/usr/src/bot/config.json -v <path to music>:/usr/src/bot/music --name dlap dlap:latest
docker run -d -v <path to config>:/usr/src/bot/config.json -v <path to music>:/usr/src/bot/music --name dlap <image name>
```

- -d flag tells Docker to run the container in detached mode, meaning it will run the container in the background of your terminal and not give us any output from it. If we don't provide it, the run will be giving us the output until the application exits. Discord bots aren't supposed to exit after certain time, so we do need this flag
- -v flag in Docker is used for volume mounting. It creates a bind mount, which allows you to specify a host path (on your local machine) and a container path (inside the Docker container). When the Docker container is run, the specified host path is mounted into the container at the specified container path.
- --name assigns a name to the container. By default, container is identified by id that is not human-readable. To conveniently refer to container when needed, we can assign it a name
- dlap:latest means "latest version of dlap image"
- \<image name> means the name of the image, if you are building it, then you should use `dlap:latest`, otherwise use either `alee14498/dlap:latest` or `ghcr.io/alee14/dlap:stable`.

View logs (optional)
```bash
Expand All @@ -74,7 +74,7 @@ docker logs -f dlap

# Configuration
Make a new file called `config.json` inside the root of your project.
```
```json
{
"token": "token_here",
"txtFile": true/false,
Expand Down

0 comments on commit 4ce9851

Please sign in to comment.