Provide an easy way to manage RPM and DEB repositories.
644
The GPG signing keys for the test repositories have been generated like that:
cd test
gpg --quick-generate-key --batch --passphrase '' [email protected]
gpg --armor --output keyFile.pub --export 845C305473F3DB14D8CF3DA0135F9FDEDDB25AA8
gpg --armor --output keyFile --export-secret-keys 845C305473F3DB14D8CF3DA0135F9FDEDDB25AA8
docker build -t openio-repo -f Dockerfile .
With local TCP port 5000 mapping to be accessible from outside
With local directory (/tmp/oio-repo) mounted inside the container (at /tmp) to keep repo storage outside docker
docker run -p 5000:5000 -v /tmp/oio-repo:/oiorepodestdir
-v /path/to/keyFile:/root/keyFile:ro openio-repo
# Start a HTTP server for yum to download the files from
cd /tmp/oio-repo
python -m SimpleHTTPServer
firefox http://localhost:8000/openio/sds/16.10
# Upload a RPM package, will trigger the repository creation
curl -F 'file=@test/rpm/centos/7/openio-sds-tools-3.2.3-1.el7.oio.x86_64.rpm' \
-F 'company=openio' \
-F 'prod=sds' \
-F 'prod_ver=16.10' \
-F 'distro=centos' \
-F 'distro_ver=7' \
-F 'arch=x86_64' \
http://127.0.0.1:5000/package
# Upload a DEB package, will trigger the repository creation
curl -F 'file=@test/deb/debian/jessie/openio-sds_3.2.3-2_amd64.deb' \
-F 'company=openio' \
-F 'prod=sds' \
-F 'prod_ver=16.10' \
-F 'distro=debian' \
-F 'distro_ver=jessie' \
-F 'arch=amd64' \
http://127.0.0.1:5000/package
Note the arch difference between RPM & DEB repositories, when in fact it's the same.
Refresh the opened page in firefox to see the just added package
cd test/rpm/centos/7
wget -r -l 1 http://mirror.openio.io/pub/repo/openio/sds/16.10/centos/7/x86_64
for f in mirror.openio.io/pub/repo/openio/sds/16.10/centos/7/x86_64/*.rpm ; do
curl -F "file=@$f" \
-F 'company=openio' \
-F 'prod=sds' \
-F 'prod_ver=16.10' \
-F 'distro=centos' \
-F 'distro_ver=7' \
-F 'arch=x86_64' \
http://127.0.0.1:5000/package
done
cd test/deb/debian/jessie
wget -r -l 1 http://mirror.openio.io/pub/repo/openio/sds/16.10/debian/jessie
for f in mirror.openio.io/pub/repo/openio/sds/16.10/debian/jessie/*.deb ; do
curl -F "file=@$f" \
-F 'company=openio' \
-F 'prod=sds' \
-F 'prod_ver=16.10' \
-F 'distro=debian' \
-F 'distro_ver=jessie' \
-F 'arch=amd64' \
http://127.0.0.1:5000/package
done
cd test/deb/ubuntu/xenial
wget -r -l 1 http://mirror.openio.io/pub/repo/openio/sds/16.10/ubuntu/xenial
for f in mirror.openio.io/pub/repo/openio/sds/16.10/ubuntu/xenial/*.deb ; do
curl -F "file=@$f" \
-F 'company=openio' \
-F 'prod=sds' \
-F 'prod_ver=16.10' \
-F 'distro=ubuntu' \
-F 'distro_ver=xenial' \
-F 'arch=amd64' \
http://127.0.0.1:5000/package
done
DOCKER_HOST_IP=`ip -4 address show dev docker0 | awk '/inet / {print substr($2,0,index($2,"/") - 1)}'`
docker build --build-arg DOCKER_HOST_IP=${DOCKER_HOST_IP} -t openio-repo-test-centos7 test/rpm/centos/7
docker build --build-arg DOCKER_HOST_IP=${DOCKER_HOST_IP} -t openio-repo-test-debianjessie test/deb/debian/jessie
docker build --build-arg DOCKER_HOST_IP=${DOCKER_HOST_IP} -t openio-repo-test-ubuntuxenial test/deb/ubuntu/xenial
# Run a CentOS 7 container with the new repository ready
docker run -ti openio-repo-test-centos7
# Run a Debian jessie + backports container with the new repository ready
docker run -ti openio-repo-test-debianjessie
# Run an Ubuntu xenial container with the new repository ready
docker run -ti openio-repo-test-ubuntuxenial
# Run a CentOS 7 container with the new repository ready
docker run -ti openio-repo-test-centos7 /bin/bash
# In that container's bash shell
yum install openio-sds-tools
# Run a Debian jessie container with the new repository ready
docker run -ti openio-repo-test-debianjessie /bin/bash
# In that container's bash shell
apt update
apt install openio-sds
# Run a Ubuntu xenial container with the new repository ready
docker run -ti openio-repo-test-ubuntuxenial /bin/bash
# In that container's bash shell
apt update
apt install openio-sds
Content type
Image
Digest
Size
90.5 MB
Last updated
almost 6 years ago
docker pull openio/repo