Add Makefile support for docker compatible alternatives#361
Add Makefile support for docker compatible alternatives#361
Conversation
Makefile: - Add CONTAINER_TOOL with default value of "docker" - Add DOCKER_SOCKET_FILE var to allow for alternative locations for the docker socket file Signed-off-by: Landon LaSmith <LLaSmith@redhat.com>
|
Hi @LaVLaS thanks for the PR, let me check with the team to get this applied to main branch |
| default: docker-build-env ## Quick start to build everything from docker shell container. | ||
| @echo "Starting a shell in the Docker build container..." | ||
| @docker run --rm -it --privileged \ | ||
| @$(CONTAINER_TOOL) run --rm -it --privileged \ |
There was a problem hiding this comment.
Hi @LaVLaS in the Makefile we prepared the docker/shell container to help developers quickly build all the artifacts of the project. With docker we prepared all the necessary changes to make the build within the shell container.
-
I tried your PR, after witching to
podman, it looks likepodmanis always directly changing the files ownership and permission on the host machine, can you take a look ? -
can you check and make sure the default target
CONTAINER_TOOL=podman makecould go through with this PR ?
There was a problem hiding this comment.
Ok. I'll take a look at the permissions issue but since the Dockerfile.build file is attempting to run docker in docker, I would recommend something like Distrobox for a containerized development & build workflow
Motivation
Add Makefile variables to support using alternative docker compatible CLIs.
Technical Details
Makefile:
CONTAINER_TOOLwith default value ofdockerDOCKER_SOCKET_FILEvar to allow for alternative locations for the docker socket fileTest Plan
There is no change to existing functionality or CI/CD automation.
All Makefile targets should continue working under existing workflows
Local development should allow for use of other docker compatible CLIs
Test Result
make docker-buildwithdockeras the default toolmake CONTAINER_TOOL=podman docker-buildwhenpodmanis installedSubmission Checklist