This is a tiny container based on Alpine distro that acts as a 'yum' repository to test your RPMs.
docker-engine
>= 1.12docker-compose
>= 1.8.1
- None
You can manually run these commands:
docker run -d -v <path_to_rpms>:/var/repo:rw intraway/yum-repo
You must mount a directory inside of the container the contains all RPM's that you want serve. This directory may have other nested directories to respect the structure of a Yum repository; for example 6/x86_64, 6/i386, 7/x86_64.
There is a docker-compose.yml
file to enable launching via docker compose.
To use this you will need a local checkout of this repo and have docker
and compose
installed.
Run the following command in the same directory as the
docker-compose.yml
file:
docker-compose up
You can customize the docker-compose.yml
:
version: '2'
services:
yumrepo:
image: intraway/yum-repo
hostname: yumrepo
container_name: yumrepo
ports:
- 80
volumes:
- ./extras/dummyrepo:/var/repo:rw
- /etc/localtime:/etc/localtime
environment:
- REPO_PORT=80
- REPO_PATH=/var/repo
- REPO_DEPTH=2
centos6:
image: centos:6
hostname: centos6-client
container_name: centos6-client
links:
- yumrepo:repo
volumes:
- ./extras/yum/container.repo:/etc/yum.repos.d/container.repo:ro
- /etc/localtime:/etc/localtime
command: yum --disablerepo=* --enablerepo=container install dummy-package-1.2
centos7:
image: centos:7
hostname: centos7-client
container_name: centos7-client
links:
- yumrepo:repo
volumes:
- ./extras/yum/container.repo:/etc/yum.repos.d/container.repo:ro
- /etc/localtime:/etc/localtime
command: yum --disablerepo=* --enablerepo=container info dummy-package-1.0_SNAPSHOT
The docker image can be tuned using environment variables.
Repository listening port. Use the -e REPO_PORT=80
to set the listening port.
Base path where the repository will be created inside the container. Use the -e REPO_PATH=/var/repo
.
Number of levels that will have the repository to create. For example, use -e REPO_DEPTH=2
if your repository have two levels depth (/).
- Listening for improvements