Dockerfiles to create bot-ready environments for Python bots utilizing the discord.py library.
500K+
A large number of updates have been done:
rustup has been upgraded from 1.27.1 to 1.29.0youtube_dl has been replaced with yt-dlpAs you may have guessed from the large gaps between updates, this image is not maintained with a large amount of active effort any more.
This is hence your forewarning that this may be the last time this image receives updates. You should consider making your own purpose-built image.
See all notices in the full README
Dockerfile links3.14.4-trixie-master-minimal, 3.14.4-master-minimal, trixie-master-minimal, master-minimal (trixie:minimal)3.14.4-trixie-master-full, 3.14.4-trixie-master, 3.14.4-master-full, 3.14.4-master, trixie-master-full, trixie-master, master-full, master (trixie:full)3.14.4-trixie-master-extras, 3.14.4-master-extras, trixie-master-extras, master-extras (trixie:extras)3.14.4-trixie-pypi-minimal, 3.14.4-trixie-minimal, 3.14.4-pypi-minimal, 3.14.4-minimal, trixie-pypi-minimal, trixie-minimal, pypi-minimal, minimal (trixie:minimal)3.14.4-trixie-pypi-full, 3.14.4-trixie-pypi, 3.14.4-trixie-full, 3.14.4-trixie, 3.14.4-pypi-full, 3.14.4-pypi, 3.14.4-full, 3.14.4, trixie-pypi-full, trixie-pypi, trixie-full, trixie, pypi-full, pypi, full, latest (trixie:full)3.14.4-trixie-pypi-extras, 3.14.4-trixie-extras, 3.14.4-pypi-extras, 3.14.4-extras, trixie-pypi-extras, trixie-extras, pypi-extras, extras (trixie:extras)3.14.4-slim-trixie-master-minimal, slim-trixie-master-minimal (slim-trixie:minimal)3.14.4-slim-trixie-master-full, 3.14.4-slim-trixie-master, slim-trixie-master-full, slim-trixie-master (slim-trixie:full)3.14.4-slim-trixie-master-extras, slim-trixie-master-extras (slim-trixie:extras)3.14.4-slim-trixie-pypi-minimal, 3.14.4-slim-trixie-minimal, slim-trixie-pypi-minimal, slim-trixie-minimal (slim-trixie:minimal)3.14.4-slim-trixie-pypi-full, 3.14.4-slim-trixie-pypi, 3.14.4-slim-trixie-full, 3.14.4-slim-trixie, slim-trixie-pypi-full, slim-trixie-pypi, slim-trixie-full, slim-trixie (slim-trixie:full)3.14.4-slim-trixie-pypi-extras, 3.14.4-slim-trixie-extras, slim-trixie-pypi-extras, slim-trixie-extras (slim-trixie:extras)3.14.4-bookworm-master-minimal, bookworm-master-minimal (bookworm:minimal)3.14.4-bookworm-master-full, 3.14.4-bookworm-master, bookworm-master-full, bookworm-master (bookworm:full)3.14.4-bookworm-master-extras, bookworm-master-extras (bookworm:extras)3.14.4-bookworm-pypi-minimal, 3.14.4-bookworm-minimal, bookworm-pypi-minimal, bookworm-minimal (bookworm:minimal)3.14.4-bookworm-pypi-full, 3.14.4-bookworm-pypi, 3.14.4-bookworm-full, 3.14.4-bookworm, bookworm-pypi-full, bookworm-pypi, bookworm-full, bookworm (bookworm:full)3.14.4-bookworm-pypi-extras, 3.14.4-bookworm-extras, bookworm-pypi-extras, bookworm-extras (bookworm:extras)3.14.4-slim-bookworm-master-minimal, slim-bookworm-master-minimal (slim-bookworm:minimal)3.14.4-slim-bookworm-master-full, 3.14.4-slim-bookworm-master, slim-bookworm-master-full, slim-bookworm-master (slim-bookworm:full)3.14.4-slim-bookworm-master-extras, slim-bookworm-master-extras (slim-bookworm:extras)3.14.4-slim-bookworm-pypi-minimal, 3.14.4-slim-bookworm-minimal, slim-bookworm-pypi-minimal, slim-bookworm-minimal (slim-bookworm:minimal)3.14.4-slim-bookworm-pypi-full, 3.14.4-slim-bookworm-pypi, 3.14.4-slim-bookworm-full, 3.14.4-slim-bookworm, slim-bookworm-pypi-full, slim-bookworm-pypi, slim-bookworm-full, slim-bookworm (slim-bookworm:full)3.14.4-slim-bookworm-pypi-extras, 3.14.4-slim-bookworm-extras, slim-bookworm-pypi-extras, slim-bookworm-extras (slim-bookworm:extras)3.14.4-alpine-master-minimal, alpine-master-minimal (alpine:minimal)3.14.4-alpine-master-full, 3.14.4-alpine-master, alpine-master-full, alpine-master (alpine:full)3.14.4-alpine-master-extras, alpine-master-extras (alpine:extras)3.14.4-alpine-pypi-minimal, 3.14.4-alpine-minimal, alpine-pypi-minimal, alpine-minimal (alpine:minimal)3.14.4-alpine-pypi-full, 3.14.4-alpine-pypi, 3.14.4-alpine-full, 3.14.4-alpine, alpine-pypi-full, alpine-pypi, alpine-full, alpine (alpine:full)3.14.4-alpine-pypi-extras, 3.14.4-alpine-extras, alpine-pypi-extras, alpine-extras (alpine:extras)3.13.13-trixie-master-minimal, 3.13.13-master-minimal (trixie:minimal)3.13.13-trixie-master-full, 3.13.13-trixie-master, 3.13.13-master-full, 3.13.13-master (trixie:full)3.13.13-trixie-master-extras, 3.13.13-master-extras (trixie:extras)3.13.13-trixie-pypi-minimal, 3.13.13-trixie-minimal, 3.13.13-pypi-minimal, 3.13.13-minimal (trixie:minimal)3.13.13-trixie-pypi-full, 3.13.13-trixie-pypi, 3.13.13-trixie-full, 3.13.13-trixie, 3.13.13-pypi-full, 3.13.13-pypi, 3.13.13-full, 3.13.13 (trixie:full)3.13.13-trixie-pypi-extras, 3.13.13-trixie-extras, 3.13.13-pypi-extras, 3.13.13-extras (trixie:extras)3.13.13-slim-trixie-master-minimal (slim-trixie:minimal)3.13.13-slim-trixie-master-full, 3.13.13-slim-trixie-master (slim-trixie:full)3.13.13-slim-trixie-master-extras (slim-trixie:extras)3.13.13-slim-trixie-pypi-minimal, 3.13.13-slim-trixie-minimal (slim-trixie:minimal)3.13.13-slim-trixie-pypi-full, 3.13.13-slim-trixie-pypi, 3.13.13-slim-trixie-full, 3.13.13-slim-trixie (slim-trixie:full)3.13.13-slim-trixie-pypi-extras, 3.13.13-slim-trixie-extras (slim-trixie:extras)3.13.13-bookworm-master-minimal (bookworm:minimal)3.13.13-bookworm-master-full, 3.13.13-bookworm-master (bookworm:full)3.13.13-bookworm-master-extras (bookworm:extras)3.13.13-bookworm-pypi-minimal, 3.13.13-bookworm-minimal (bookworm:minimal)3.13.13-bookworm-pypi-full, 3.13.13-bookworm-pypi, 3.13.13-bookworm-full, 3.13.13-bookworm (bookworm:full)3.13.13-bookworm-pypi-extras, 3.13.13-bookworm-extras (bookworm:extras)3.13.13-slim-bookworm-master-minimal (slim-bookworm:minimal)3.13.13-slim-bookworm-master-full, 3.13.13-slim-bookworm-master (slim-bookworm:full)3.13.13-slim-bookworm-master-extras (slim-bookworm:extras)3.13.13-slim-bookworm-pypi-minimal, 3.13.13-slim-bookworm-minimal (slim-bookworm:minimal)3.13.13-slim-bookworm-pypi-full, 3.13.13-slim-bookworm-pypi, 3.13.13-slim-bookworm-full, 3.13.13-slim-bookworm (slim-bookworm:full)3.13.13-slim-bookworm-pypi-extras, 3.13.13-slim-bookworm-extras (slim-bookworm:extras)3.13.13-alpine-master-minimal (alpine:minimal)3.13.13-alpine-master-full, 3.13.13-alpine-master (alpine:full)3.13.13-alpine-master-extras (alpine:extras)3.13.13-alpine-pypi-minimal, 3.13.13-alpine-minimal (alpine:minimal)3.13.13-alpine-pypi-full, 3.13.13-alpine-pypi, 3.13.13-alpine-full, 3.13.13-alpine (alpine:full)3.13.13-alpine-pypi-extras, 3.13.13-alpine-extras (alpine:extras)* 3.12.13, 3.11.15 and 3.10.20 tags also available but trimmed for length
(150 variants, 2464 tags)
See all the tags in the full README
This image comes in few variants depending on your use case:
discord.py:minimalThis is the base, and therefore smallest, image. It contains only discord.py with voice and docs support, including ffmpeg and youtube-dl.
discord.py:fullThis is the default image. This contains some precompiled common dependencies, and as such, is much larger than the base image.
These dependencies are:
asyncpg, click, coverage, flake8, lxml, matplotlib, Pillow, psutil, pycryptodome, pylint, pytest-cov, PyYAML, ruamel.yaml, toml, twineThis can help reduce bot installation time as packages that would otherwise take a long time to compile or acquire are already installed.
discord.py:extrasThis image extends the full image with more dependencies:
aiomysql, beautifulsoup4, cairosvg, colorlog, colorthief, fuzzywuzzy, humanize, lru-dict, objgraph, parsedatetime, python-dateutil, redis, sqlalchemy, tabulate, tox, wandThis image is therefore the largest image and is only recommended if you use a large variety of these dependencies.
FROM gorialis/discord.py
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "bot.py"]
You can use tags if you need specific versions:
FROM gorialis/discord.py:3.9-alpine
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "bot.py"]
Then you can build your image and run it:
$ docker build -t my-bot .
$ docker run -it --rm --name my-running-bot my-bot
If you are running one-time scripts, creating your own Dockerfile might be tedious. You can use this image directly from CLI like so:
$ docker run -it --rm --name my-bot -v $PWD:/app -w /app gorialis/discord.py:master python your-bot.py
You can also do this for tests:
$ docker run -it --rm --name my-tests -v $PWD:/app -w /app gorialis/discord.py:master pytest -vs
The discord.py library is available through the MIT License under copyright from Rapptz.
Please visit the original repository for more information.
Content type
Image
Digest
sha256:5137698c2…
Size
651.8 MB
Last updated
about 1 month ago
docker pull gorialis/discord.py:alpine-extras