Describe the bug
Podman is an alternative to the Docker container engine, and fully compatible. On Linux it can typically replace docker by aliasing the command such as alias docker=podman. But when using podman, the codebuild_build.sh script does not work out of the box, and in fact I cannot get it to run at all without docker installed.
To Reproduce
Steps to reproduce the behavior:
On Fedora Linux (37) Docker is not installed by default. Configure alias docker=podman in ~/.bashrc and spawn a new shell. Run codebuild_build.sh and you get many errors.
Use this diff to try to make some minor changes to use podman:
-docker_command="docker run -it "
+docker_command="podman run -it "
if isOSWindows
then
docker_command+="-v //var/run/docker.sock:/var/run/docker.sock -e "
else
docker_command+="-v /run/user/1000/podman/podman.sock:/var/run/docker.sock -e "
fi
docker_command+="\"IMAGE_NAME=$image_name\" -e \
3. When running the script now, I still get an error:
./codebuild_build.sh -i localhost/aws/codebuild/standard:6.0 -a /tmp/artifacts -s ./sourcedir/
Build Command:
podman run -it -v /run/user/1000/podman/podman.sock:/var/run/docker.sock -e "IMAGE_NAME=localhost/aws/codebuild/standard:6.0" -e "ARTIFACTS=/tmp/artifacts" -e "SOURCE=sourcedir" -e "INITIATOR=username" public.ecr.aws/codebuild/local-builds:latest
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
I've also tried setting DOCKER_HOST unsuccessfully.
Expected behavior
Should be able to run the images needed for the local codebuild build process.
Platform (please complete the following information):
Describe the bug Podman is an alternative to the Docker container engine, and fully compatible. On Linux it can typically replace docker by aliasing the command such as
alias docker=podman
. But when using podman, the codebuild_build.sh script does not work out of the box, and in fact I cannot get it to run at all without docker installed.To Reproduce Steps to reproduce the behavior:
alias docker=podman
in~/.bashrc
and spawn a new shell. Runcodebuild_build.sh
and you get many errors.-docker_command="docker run -it " +docker_command="podman run -it " if isOSWindows then docker_command+="-v //var/run/docker.sock:/var/run/docker.sock -e " else
docker_command+="-v /run/user/1000/podman/podman.sock:/var/run/docker.sock -e " fi
docker_command+="\"IMAGE_NAME=$image_name\" -e \
Expected behavior Should be able to run the images needed for the local codebuild build process.
Platform (please complete the following information):