Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command options and documentation to Docker Compose #1645

Merged
merged 9 commits into from
Jan 12, 2024
Prev Previous commit
Next Next commit
Update README: Complete 'Removing the Repository' Section
- Added the missing step for removing Bandersnatch configuration files.
- Included a step for cleaning up Docker artifacts with `docker system prune`.
- Improved clarity and completeness of the repository removal instructions.
  • Loading branch information
benjisho authored Jan 12, 2024
commit 0070745e4aa08a68504c2c318d4a5a62f33e78d3
29 changes: 27 additions & 2 deletions src/bandersnatch_docker_compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,40 @@ defined networks. But it might also happen that your network allows jumbo frames
and then an MTU of 1500 is more like an artificial limitation. As stated, the
example took an MTU of 800 to make sure.

## Pull the Docker Image
```bash
docker pull pypa/bandersnatch:latest
```

## Run (with docker-compose v2)
```bash
docker compose up -d
```

## Removing the Repository

To remove the Bandersnatch repository that you've set up using Docker Compose, follow these steps. Please be aware that this process will delete all the packages and configuration files you have downloaded or created. Ensure you have backups if necessary.

- `docker compose up -d`
1. **Stop the Docker Containers**: Before removing any files, it's important to stop the running Docker containers to prevent any file corruption or data loss. Use the command:
```bash
docker compose down
```

2. **Remove the Packages and Configuration Files**: To delete all the downloaded packages and configuration files, run the following command. This will remove the `packages` and entire `config` directory directory inside your `config` folder, which contains all the mirrored Python packages.
```bash
rm -rf ./data/
rm -rf ./config/
```

3. **Clean up Docker Artifacts**: Finally, to remove any Docker volumes, networks, or other artifacts that were created with the Docker Compose file, you can use the following command:
```bash
docker system prune --volumes
```
## Caveats

Watch out for your docker MTU settings. Changing the MTU of the daemon is not going to help (see issue #1271).
Otherwise you might get error messages like these:

```
```bash
ERROR: Call to list_packages_with_serial @ https://pypi.org/pypi timed out: Connection timeout to host https://pypi.org/pypi (master.py:218)
```