docker-artifact/README.md

68 lines
2.0 KiB
Markdown
Raw Normal View History

2018-10-21 16:37:53 -07:00
docker-artifact
===============
Software repository server
2019-05-04 21:26:27 -07:00
Artifactd provides an HTTP API for repository management. Currently, Python and Apt repositories are supported.
2018-10-21 16:37:53 -07:00
Quickstart
----------
* Pull or build the image
2019-05-04 21:26:27 -07:00
* `docker run -it --rm -e 'DATABASE_URL=mysql+pymysql://...' -e 'S3_URL=http://...' -p 8080:8080 artifact`
2018-10-21 16:37:53 -07:00
2019-05-04 21:26:27 -07:00
The in-container webserver will listen on port 8080 by default. Database url is passed directly to sqlalchemy, but only
mysql is tested. S3_URL is in the form of `https?://keyname:keysecret@endpoint_url/bucket_name`. Amazon S3 is supported
but minio is the preferred backend.
2018-10-21 16:37:53 -07:00
Examples
--------
Upload python package:
2019-05-04 21:26:27 -07:00
`curl -vv -F 'f=@pyircbot-4.0.0.post3-py3.5.egg' 'http://localhost:8080/addpkg?provider=pypi&reponame=main&name=pyircbot&version=4.0.0'`
2018-10-21 16:37:53 -07:00
Install python packages:
2019-05-04 21:26:27 -07:00
`pip3 install -i http://host/repo/pypi/main/ --trusted-host host <packages>`
2018-10-21 16:37:53 -07:00
Upload apt package:
2019-05-04 21:26:27 -07:00
`curl -vv -F 'f=@python3_3.6.7-1~18.04_amd64.deb' 'http://host/addpkg?provider=apt&reponame=main&name=python3&version=3.6.7-1~18.04&dist=bionic'`
2018-10-21 16:37:53 -07:00
Install apt packages:
```
2019-05-04 21:26:27 -07:00
wget -qO- http://host/repo/apt/main/pubkey | apt-key add - && \
2018-10-21 16:37:53 -07:00
echo "deb http://host/repo/apt/main bionic main" | tee -a /etc/apt/sources.list && \
2019-05-04 21:26:27 -07:00
apt-get update
2018-10-21 16:37:53 -07:00
```
Notes
-----
* Repos are created automatically when a package is added to them.
2019-05-04 21:26:27 -07:00
* Repo URLs are structured as: `/repo/<provider>/<name>`. URLs at and below this level are handled directly by
the provider.
* In the apt provider, only binary-amd64 packages are supported. No source, binary-386 or other groups
* In the apt provider, every repo has only one component, named "main"
2018-10-21 16:37:53 -07:00
* The apt provider will generate a gpg key per repo upon repo creation
2019-05-04 21:26:27 -07:00
* The repo contents can be browsed on the web
* This uses my fork of python-dpkg, from [here](https://git.davepedu.com/dave/python-dpkg), which is not automatically
installed via `setup.py` due to pip limitations.
2018-10-21 16:37:53 -07:00
Todo
----
* Auth
* Delete packages
* Support using existing GPG keys
2019-05-04 21:26:27 -07:00
* Nicer UI