This commit is contained in:
Puru 2024-09-25 10:27:56 +02:00 committed by GitHub
commit 59f17db164
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 0 deletions

17
Dockerfile.python Normal file
View file

@ -0,0 +1,17 @@
# Use an official Python runtime as the base image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the Python script into the container
COPY mkbsd.py /app/mkbsd.py
# Install the required packages
RUN pip install aiohttp
# Set Python to run in unbuffered mode
ENV PYTHONUNBUFFERED=1
# Run the script when the container launches
CMD ["python", "mkbsd.py"]

View file

@ -30,6 +30,18 @@ MKBSD comes in two variants! Node.js and Python.
4. Wait a little. 4. Wait a little.
5. All wallpapers are now in a newly created `downloads` subfolder. 5. All wallpapers are now in a newly created `downloads` subfolder.
### Running in Python (Docker)
1. Ensure you have Docker installed. [Get Docker](https://docs.docker.com/get-docker/)
2. Build the container image:
```
docker build -t mkbsd:python -f Dockerfile.python .
```
3. Run the container:
```
docker run -v $PWD/downloads:/app/downloads mkbsd:python
```
## FAQ ## FAQ
### Q: What's the story behind this? ### Q: What's the story behind this?