mirror of
https://github.com/containers/podman.git
synced 2025-06-01 09:06:44 +08:00
Add toggle for Docker install/deinstall for baseline test
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #461 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
4344639508
commit
5ac9294a79
@ -7,20 +7,30 @@
|
|||||||
#
|
#
|
||||||
# To run this command:
|
# To run this command:
|
||||||
#
|
#
|
||||||
|
# /bin/bash -v test_podman_baseline.sh -d # Install and then deinstall Docker
|
||||||
# /bin/bash -v test_podman_baseline.sh -e # Stop on error
|
# /bin/bash -v test_podman_baseline.sh -e # Stop on error
|
||||||
# /bin/bash -v test_podman_baseline.sh # Continue on error
|
# /bin/bash -v test_podman_baseline.sh # Continue on error
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# See if we want to stop on errors or not.
|
# See if we want to stop on errors and/or install and then remove Docker.
|
||||||
#######
|
#######
|
||||||
showerror=0
|
showerror=0
|
||||||
while getopts "e" opt; do
|
installdocker=0
|
||||||
|
while getopts "de" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
|
d) installdocker=1
|
||||||
|
;;
|
||||||
e) showerror=1
|
e) showerror=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$installdocker" -eq 1 ]
|
||||||
|
then
|
||||||
|
echo "Script will install and then deinstall Docker."
|
||||||
|
set -eu
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$showerror" -eq 1 ]
|
if [ "$showerror" -eq 1 ]
|
||||||
then
|
then
|
||||||
echo "Script will stop on unexpected errors."
|
echo "Script will stop on unexpected errors."
|
||||||
@ -131,11 +141,14 @@ podman images
|
|||||||
########
|
########
|
||||||
podman rm -a
|
podman rm -a
|
||||||
|
|
||||||
########
|
if [ "$installdocker" -eq 1 ]
|
||||||
# Install Docker, but not for long!
|
then
|
||||||
########
|
########
|
||||||
dnf -y install docker
|
# Install Docker, but not for long!
|
||||||
systemctl start docker
|
########
|
||||||
|
dnf -y install docker
|
||||||
|
fi
|
||||||
|
systemctl restart docker
|
||||||
|
|
||||||
########
|
########
|
||||||
# Push fedora-bashecho to the Docker daemon
|
# Push fedora-bashecho to the Docker daemon
|
||||||
@ -147,10 +160,13 @@ podman push runecho docker-daemon:fedora-bashecho:latest
|
|||||||
########
|
########
|
||||||
docker run fedora-bashecho ./tmp/runecho.sh
|
docker run fedora-bashecho ./tmp/runecho.sh
|
||||||
|
|
||||||
########
|
if [ "$installdocker" -eq 1 ]
|
||||||
# Time to remove Docker
|
then
|
||||||
########
|
########
|
||||||
dnf -y remove docker
|
# Time to remove Docker
|
||||||
|
########
|
||||||
|
dnf -y remove docker
|
||||||
|
fi
|
||||||
|
|
||||||
########
|
########
|
||||||
# Build Dockerfile
|
# Build Dockerfile
|
||||||
|
Reference in New Issue
Block a user