From 2c6c0decbeccec60274eb7dd142a669099403164 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 20 Apr 2020 17:30:11 +0200 Subject: [PATCH] containerized-build: set WORKDIR and use in make target By setting the WORKDIR in the container image, there is no need to pass it on the commandline in the Makefile. This makes the line for the make target a little cleaner. Signed-off-by: Niels de Vos --- Makefile | 2 +- scripts/Dockerfile.devel | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b0c874558..95694e0e1 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ cephcsi: .PHONY: containerized-build containerized-test containerized-build: .devel-container-id - $(CONTAINER_CMD) run --rm -v $(PWD):/go/src/github.com/ceph/ceph-csi$(SELINUX_VOL_FLAG) $(CSI_IMAGE_NAME):devel make -C /go/src/github.com/ceph/ceph-csi cephcsi + $(CONTAINER_CMD) run --rm -v $(PWD):/go/src/github.com/ceph/ceph-csi$(SELINUX_VOL_FLAG) $(CSI_IMAGE_NAME):devel make cephcsi containerized-test: .test-container-id $(CONTAINER_CMD) run --rm -v $(PWD):/go/src/github.com/ceph/ceph-csi$(SELINUX_VOL_FLAG) $(CSI_IMAGE_NAME):test make test diff --git a/scripts/Dockerfile.devel b/scripts/Dockerfile.devel index 590fd8651..4c998b735 100644 --- a/scripts/Dockerfile.devel +++ b/scripts/Dockerfile.devel @@ -18,3 +18,5 @@ RUN dnf -y install \ librbd-devel \ && dnf -y update \ && true + +WORKDIR "/go/src/github.com/ceph/ceph-csi"