Skip to content

Commit 9fde20d

Browse files
authored
Merge pull request #1205 from sanjay20m/patch-1
Fix:Local yum repo not enabled by default in centos8 and fedora35 entrypoints
2 parents 54ae431 + 206a969 commit 9fde20d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/release/docker/centos8/entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
: ${LOCAL_REPO_DIRECTORY:=/local-repository}
2323
if [[ -d ${LOCAL_REPO_DIRECTORY} ]]; then
2424
echo "Setting up local-repository"
25-
createrepo /local-repository
25+
createrepo "${LOCAL_REPO_DIRECTORY}"
2626

2727
cat >/etc/yum.repos.d/local.repo <<EOL
2828
[local-repository]
2929
name=NVIDIA Container Toolkit Local Packages
30-
baseurl=file:///local-repository
31-
enabled=0
30+
baseurl=file://${LOCAL_REPO_DIRECTORY}
31+
enabled=1
3232
gpgcheck=0
3333
protect=1
3434
EOL
35-
yum-config-manager --enable local-repository
35+
3636
elif [[ -n ${TEST_REPO} ]]; then
3737
./install_repo.sh ${TEST_REPO}
3838
else

tests/release/docker/fedora35/entrypoint.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@
2222
: ${LOCAL_REPO_DIRECTORY:=/local-repository}
2323
if [[ -d ${LOCAL_REPO_DIRECTORY} ]]; then
2424
echo "Setting up local-repository"
25-
createrepo /local-repository
25+
createrepo "${LOCAL_REPO_DIRECTORY}"
2626

2727
cat >/etc/yum.repos.d/local.repo <<EOL
2828
[local-repository]
2929
name=NVIDIA Container Toolkit Local Packages
30-
baseurl=file:///local-repository
31-
enabled=0
30+
baseurl=file://${LOCAL_REPO_DIRECTORY}
31+
enabled=1
3232
gpgcheck=0
3333
protect=1
3434
EOL
35-
yum-config-manager --enable local-repository
3635
elif [[ -n ${TEST_REPO} ]]; then
3736
./install_repo.sh ${TEST_REPO}
3837
else

0 commit comments

Comments
 (0)