mirror of
https://github.com/nadimkobeissi/mkbsd.git
synced 2024-12-22 09:45:13 +00:00
Add Dockerfile and update README.md for Docker support
* **Dockerfile** - Add a `Dockerfile` to set up a Node.js environment - Add instructions to copy `mkbsd.js` and install dependencies - Add a command to run `mkbsd.js` * **README.md** - Add a section for running the downloads via Docker - Include instructions to build and run the Docker container
This commit is contained in:
parent
82e50c64f0
commit
5151d67dff
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
# Use the official Node.js image as the base image
|
||||
FROM node:14
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the package.json and package-lock.json files to the working directory
|
||||
COPY package*.json ./
|
||||
|
||||
# Install the dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the application code to the working directory
|
||||
COPY . .
|
||||
|
||||
# Command to run the mkbsd.js script
|
||||
CMD ["node", "mkbsd.js"]
|
14
README.md
14
README.md
@ -30,6 +30,20 @@ MKBSD comes in two variants! Node.js and Python.
|
||||
4. Wait a little.
|
||||
5. All wallpapers are now in a newly created `downloads` subfolder.
|
||||
|
||||
### Running in Docker
|
||||
|
||||
1. Ensure you have Docker installed.
|
||||
2. Build the Docker image:
|
||||
```sh
|
||||
docker build -t mkbsd .
|
||||
```
|
||||
3. Run the Docker container:
|
||||
```sh
|
||||
docker run --rm -v $(pwd)/downloads:/app/downloads mkbsd
|
||||
```
|
||||
4. Wait a little.
|
||||
5. All wallpapers are now in a newly created `downloads` subfolder.
|
||||
|
||||
## FAQ
|
||||
|
||||
### Q: What's the story behind this?
|
||||
|
Loading…
Reference in New Issue
Block a user