From 44c8efc6c9fcde8b064ed516ee0ab444fc308693 Mon Sep 17 00:00:00 2001 From: Gustavo Pantuza Date: Thu, 23 Jul 2020 18:21:04 -0300 Subject: [PATCH 1/3] Adds WORKDIR Docker command to define Work directory on a shell --- Dockerfile.bionic | 2 ++ Dockerfile.trusty | 2 ++ Dockerfile.xenial | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Dockerfile.bionic b/Dockerfile.bionic index 753bb60..96905d4 100644 --- a/Dockerfile.bionic +++ b/Dockerfile.bionic @@ -13,5 +13,7 @@ RUN set -ex; \ COPY entrypoint.sh / RUN chmod +x /entrypoint.sh +WORKDIR /usr/share/bcc/tools + ENTRYPOINT ["/entrypoint.sh"] CMD ["/bin/bash"] diff --git a/Dockerfile.trusty b/Dockerfile.trusty index c11c174..504a6a6 100644 --- a/Dockerfile.trusty +++ b/Dockerfile.trusty @@ -13,5 +13,7 @@ RUN set -ex; \ COPY entrypoint.sh / RUN chmod +x /entrypoint.sh +WORKDIR /usr/share/bcc/tools + ENTRYPOINT ["/entrypoint.sh"] CMD ["/bin/bash"] diff --git a/Dockerfile.xenial b/Dockerfile.xenial index 301fa3c..fa2c388 100644 --- a/Dockerfile.xenial +++ b/Dockerfile.xenial @@ -13,5 +13,7 @@ RUN set -ex; \ COPY entrypoint.sh / RUN chmod +x /entrypoint.sh +WORKDIR /usr/share/bcc/tools + ENTRYPOINT ["/entrypoint.sh"] CMD ["/bin/bash"] From 7684d4c67de23d2e9c77ac05920228141a6d8400 Mon Sep 17 00:00:00 2001 From: Gustavo Pantuza Date: Thu, 23 Jul 2020 18:22:11 -0300 Subject: [PATCH 2/3] Removes workdir argument because it is setted by Dockerfiles --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d9414a5..898b2fa 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ push.${1}: .PHONY: run.${1} run.${1}: - docker run -it --rm $(DOCKER_CAPS) $(DOCKER_VOLUMES) --workdir /usr/share/bcc/ $(REPO):${1} + docker run -it --rm $(DOCKER_CAPS) $(DOCKER_VOLUMES) $(REPO):${1} endef #ADD_TARGET .PHONY: build push From a1e131f159f167a2d32080e416d3b587cd700e31 Mon Sep 17 00:00:00 2001 From: Gustavo Pantuza Date: Thu, 23 Jul 2020 18:23:01 -0300 Subject: [PATCH 3/3] Removes workdir argument in order to simplify getting started --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1158fc7..4c061cb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ docker run -it --rm \ -v /lib/modules:/lib/modules:ro \ -v /usr/src:/usr/src:ro \ -v /etc/localtime:/etc/localtime:ro \ - --workdir /usr/share/bcc/tools \ zlim/bcc ```