File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+ # This script:
4+
5+ # - creates a dockerfile
6+ # - prepares a docker image that can run `createrepo` that has the latest release rpms
7+ # - "runs" the image by creating a throwaay container
8+ # - copies the result of createrepo out of the throwaway container
9+ # - destroys the throwaway container
10+ mkdir -p createrepo/dist
11+ cat > createrepo/Dockerfile << EOF
12+ FROM fedora:32
13+ RUN yum install -y createrepo_c
14+ RUN mkdir /packages
15+ CMD touch /tmp/foo
16+ COPY dist/*.rpm /packages/
17+ RUN createrepo /packages
18+ EOF
19+
20+ cp dist/* .rpm createrepo/dist/
21+ docker build -t createrepo createrepo/
22+ docker create -ti --name runcreaterepo createrepo bash
23+ docker cp runcreaterepo:/packages/repodata .
24+ docker rm -f runcreaterepo
You can’t perform that action at this time.
0 commit comments