Last active
May 17, 2017 11:37
Create a Docker container based on a repo from RDO Trunk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create a Dockerfile with the following contents: | |
FROM centos:7 | |
LABEL maintainer=jpena name=DLRN-current | |
# Install Apache and rsync | |
RUN yum -y install httpd rsync && yum clean all | |
# Sync trunk.rdo contents | |
RUN rsync -avL trunk.rdoproject.org::centos7/current/ /var/www/html/repos | |
# Run command when container is started | |
CMD /usr/sbin/httpd $OPTIONS -DFOREGROUND | |
2. Build the container image | |
$ docker build -t dlrn/current:$(date --utc "+%Y%m%d%H%M%S") . | |
Using a date for the tag allows you to create multiple builds. | |
Note: rsync access is not enabled for all, we need to allow it case by case. | |
3. Run it | |
$ docker run -p 8080:80 dlrn/current:20170517104848 | |
4. Now, you can create a .repo file pointing to http://localhost:8080/repos, which will use the RDO Trunk repo you synced. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment