Skip to content

Instantly share code, notes, and snippets.

@SeanSyue
Created June 17, 2020 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanSyue/1d56d5928b8b76f9031b85be286f282c to your computer and use it in GitHub Desktop.
Save SeanSyue/1d56d5928b8b76f9031b85be286f282c to your computer and use it in GitHub Desktop.
Yumdownloader Dockerfile
# docker image to download yum rpms via dependencies
# these are the centos tags you can use below if you want to use a different version of centos
#latest, centos7, 7 (docker/Dockerfile)
#centos6, 6 (docker/Dockerfile)
#centos5, 5 (docker/Dockerfile)
#centos7.1.1503, 7.1.1503 (docker/Dockerfile)
#centos7.0.1406, 7.0.1406 (docker/Dockerfile)
#centos6.7, 6.7 (docker/Dockerfile)
#centos6.6, 6.6 (docker/Dockerfile)
#centos5.11, 5.11 (docker/Dockerfile)
# For more information, check the website below:
# https://github.com/tenfourty/yum-rpm-downloader-docker/blob/master/Dockerfile
FROM centos:7
# install yum-utils for the yumdownloader command
# if you needed additional repositories you could do that here
RUN yum install -y yum-utils
# create my rpms directory (mount your local volume to this path)
RUN mkdir /rpms
VOLUME /rpms
ENTRYPOINT ["yumdownloader", "--destdir=/rpms", "--resolve"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment