mirror of
https://github.com/hexboy/maven-mirror-tool.git
synced 2025-09-02 10:39:31 +00:00
add docker image usage instruction
This commit is contained in:
parent
86adff94cb
commit
848b1fa8f8
1 changed files with 39 additions and 10 deletions
29
README.md
29
README.md
|
@ -131,6 +131,35 @@ allprojects {
|
||||||
|
|
||||||
3. Run your Gradle builds as usual. The tool will intercept and resolve dependencies from the local endpoint, caching them if needed.
|
3. Run your Gradle builds as usual. The tool will intercept and resolve dependencies from the local endpoint, caching them if needed.
|
||||||
|
|
||||||
|
## Using the Docker Image
|
||||||
|
|
||||||
|
You can also run the Maven Repository Mirroring and Caching Tool using Docker. This can simplify deployment and ensure consistency across different environments.
|
||||||
|
|
||||||
|
To use the Docker image `hexboy2011/maven-mirror-tool:latest`, follow these steps:
|
||||||
|
|
||||||
|
1. Pull the Docker image:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull hexboy2011/maven-mirror-tool:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the Docker container, mapping port 8008 and binding the cache directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d \
|
||||||
|
-p 8008:8008 \
|
||||||
|
-v /your/custom/cache/dir:/home/node/app/local-cache \
|
||||||
|
hexboy2011/maven-mirror-tool:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### In this example
|
||||||
|
|
||||||
|
- `-d`: Starts the container as a daemon, running it in the background.
|
||||||
|
|
||||||
|
- `-p 8008:8008`: Maps port 8008 on your host to port 8008 in the container.
|
||||||
|
|
||||||
|
- `-v /your/custom/cache/dir:/home/node/app/local-cache`: Binds the directory /your/custom/cache/dir on your host to /home/node/app/local-cache in the container, allowing the container to store cached artifacts locally.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions are welcome! If you find any issues or would like to enhance the project, feel free to submit a pull request. Please follow the existing code style and provide clear commit messages.
|
Contributions are welcome! If you find any issues or would like to enhance the project, feel free to submit a pull request. Please follow the existing code style and provide clear commit messages.
|
||||||
|
|
Loading…
Add table
Reference in a new issue