Skip to content

Commit ee4ec41

Browse files
committed
Specify local user UID during build
1 parent 6d53945 commit ee4ec41

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
containers:
2+
# Use local UID to avoid files permission issues when mounting directories
3+
# We could do this at runtime, by specifying the user, but it's easier doing it
4+
# at build time, so no special commands will be necessary at runtime
5+
docker compose build --build-arg UID=`id -u` dev
26
# To build shared container layers only once we build a single container before the other ones
3-
docker compose build dev
4-
docker compose build
7+
docker compose build --build-arg UID=`id -u`
58

69
dev:
710
poetry run uvicorn http_app:create_app --host 0.0.0.0 --port 8000 --factory --reload

0 commit comments

Comments
 (0)