Make sure you have installed all of the following prerequisites on your development machine:
- Docker - Download & Install Docker
- Kubernetes Cluster (Local or Remote)
- kubectl - Download & Install Kubectl
- Docker Registry
docker run -d -p 5000:5000 --name registry registry:2
git clone https://github.com/Akshaya-T/pypi.git
This will clone the latest version of the pypi repository to pypi folder.
cd pypi
# localhost:5000 -> replace it with you container registry and port
docker build -t localhost:5000/pypi-server .
# localhost:5000 -> replace it with you container registry and port
docker push localhost:5000/pypi-server
# Make sure to change secret values before apply
kubectl apply -f k8s/
kubectl port-forward <<pod-id>> 8080:80 --address 0.0.0.0
python3 -m twine upload -r local dist/
pip install -i http://pypi:pass@localhost:8080/simple mypackage