Skip to content

fleeto/yum.centos7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yumrepo

Docker file, Yum repository for CentOS 7.

Usage

Build

  • Build
docker build \ 
-t image.registry/yumrepo:0.1
  • Build with proxy
docker build \ 
--build-arg http_proxy=web.proxy:8080 \
--build-arg https_proxy=web.proxy:8080 \
-t image.registry/yumrepo:0.1

Run

#!/bin/sh
docker run -d \
    -e http_proxy='web.proxy:8080' \
    -e https_proxy='web.proxy:8080' \
    -v /u01/repo.data/:/repo \
    -v /u01/repo.total:/repo.def \
    -p 8084:80 \
    --name=centos7yum \
    "image.registry/yumrepo:0.1"

/repo: RPMs path, we can map it to an external volume to make it persistent

/repo.def: you can store *.repo files into it, and it will replace the origin total.repo.

Update

docker exec [container id] refresh.sh

Yum Repository defination

[localrepo]
name=LAN Repository
baseurl=http://repo.server.url:8084
enabled=1
gpgcheck=0

About

Docker files, Yum repository of CentOS 7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published