-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a script to prep the container build image
Signed-off-by: Shreenidhi Shedi <[email protected]>
- Loading branch information
Showing
3 changed files
with
68 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
FROM fedora:34 | ||
|
||
RUN dnf -y upgrade | ||
RUN dnf -y install gcc make cmake libcurl-devel rpm-devel rpm-build \ | ||
libsolv-devel popt-devel sed createrepo_c glib2-devel expat \ | ||
findutils python3-pytest python3-requests python3-urllib3 \ | ||
python3-pyOpenSSL python3 python3-devel valgrind gpgme-devel \ | ||
expat-devel openssl-devel sqlite-devel rpm-sign which python3-pip \ | ||
shadow-utils sudo e2fsprogs util-linux | ||
|
||
RUN pip3 install flake8 | ||
|
||
RUN mkdir -p /var/lib/tdnf | ||
COPY ci/prep.sh /prep.sh | ||
RUN chmod +x /prep.sh | ||
RUN /prep.sh | ||
|
||
CMD ["/bin/bash"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,7 @@ | ||
FROM photon:latest | ||
|
||
RUN tdnf update -y | ||
RUN tdnf remove -y toybox | ||
RUN tdnf install -y --enablerepo=photon-debuginfo \ | ||
build-essential cmake curl-devel rpm-build \ | ||
libsolv-devel popt-devel sed createrepo_c glib expat-libs \ | ||
findutils python3 python3-pip python3-setuptools \ | ||
python3-devel valgrind gpgme-devel glibc-debuginfo \ | ||
expat-devel openssl-devel zlib-devel sqlite-devel \ | ||
python3-requests python3-urllib3 python3-pyOpenSSL \ | ||
sudo shadow which e2fsprogs util-linux | ||
|
||
# this can to be removed once latest pytest gets published in photon | ||
RUN pip3 install pytest flake8 | ||
|
||
RUN mkdir -p /var/lib/tdnf | ||
COPY ci/prep.sh /prep.sh | ||
RUN chmod +x /prep.sh | ||
RUN /prep.sh | ||
|
||
CMD ["/bin/bash"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
rel_file="/etc/os-release" | ||
|
||
common_pkgs=( | ||
cmake | ||
createrepo_c | ||
e2fsprogs | ||
expat-devel | ||
findutils | ||
gpgme-devel | ||
libsolv-devel | ||
openssl-devel | ||
popt-devel | ||
python3-devel | ||
python3-pip | ||
python3-pyOpenSSL | ||
python3-requests | ||
python3-urllib3 | ||
rpm-build | ||
sed | ||
sqlite-devel | ||
sudo | ||
util-linux | ||
valgrind | ||
which | ||
) | ||
|
||
if grep -qw "Fedora" ${rel_file}; then | ||
fedora_packages=( | ||
${common_pkgs[@]} | ||
gcc | ||
glib2-devel | ||
libcurl-devel | ||
make | ||
python3-pytest | ||
python3-flake8 | ||
rpm-devel | ||
rpm-sign | ||
shadow-utils | ||
) | ||
dnf -y upgrade --refresh | ||
dnf -y install ${fedora_packages[@]} | ||
elif grep -qw "Photon" ${rel_file}; then | ||
photon_packages=( | ||
${common_pkgs[@]} | ||
build-essential | ||
curl-devel | ||
glib | ||
glibc-debuginfo | ||
shadow | ||
zlib-devel | ||
) | ||
tdnf -y upgrade --refresh | ||
tdnf remove -y toybox | ||
tdnf -y install --enablerepo=photon-debuginfo ${photon_packages[@]} | ||
pip3 install pytest flake8 | ||
fi | ||
|
||
mkdir -p /var/lib/tdnf |