From c54d040f06a93ac927839797b4cff480de022d56 Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Thu, 13 Jul 2023 11:27:40 +0200 Subject: [PATCH] Fix/ignore venv restrict bind mount (#1796) * Ignore .venv files in git and docker * Only bind mount cwd for `main` Bind mounting `.` in every case would interfere with .dockerignore We want to ignore `.venv` so that the venv of the built docker image is used. Otherwise we would use the venv of the host inside docker. This would negate the whole point of testing in a docker container. Bind mounting `.` is however useful if one wants to use docker just for "sandboxing" while running the tests on the local machine. --------- Co-authored-by: intrigus --- .dockerignore | 2 ++ .gitignore | 3 +++ docker-compose.yml | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..9f75ecdd1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# venv +.venv/ diff --git a/.gitignore b/.gitignore index d40cc7503..e6d2fdfde 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,6 @@ tests/qemu-tests/images .zig/ gdb.txt + +# venv +.venv/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index bffdffd9a..c5b01644a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,16 @@ version: "3.8" services: - main: &base-spec + base: &base-spec build: . - volumes: - - .:/pwndbg platform: linux/amd64 security_opt: - seccomp:unconfined cap_add: - SYS_PTRACE + main: + <<: *base-spec + volumes: + - .:/pwndbg ubuntu18.04: <<: *base-spec