-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
26 lines (19 loc) · 741 Bytes
/
Containerfile
File metadata and controls
26 lines (19 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM fedora
# Install tools
RUN dnf install -y rpm-build rpmdevtools rpmautospec wget git
# Setup the RPM build tree
RUN rpmdev-setuptree
# Download sources
WORKDIR /root/rpmbuild/SOURCES
RUN wget $(spectool -S /project/cie-middleware.spec 2>/dev/null | grep Source0 | cut -d" " -f 2)
# Generate specfile with correct versioning
WORKDIR /project
RUN git config --global --add safe.directory /project
RUN git status
RUN rpmautospec process-distgit cie-middleware.spec /root/rpmbuild/SPECS/cie-middleware.spec
# Copy sources
RUN cp -rf /project/* /root/rpmbuild/SOURCES
RUN rm /root/rpmbuild/SOURCES/cie-middleware.spec
WORKDIR /root/rpmbuild
# Run container until stopped
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"