From 82479dd82b4908e3f9d215dd14f556a657ee8d9e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 30 Jun 2022 12:21:58 +0500 Subject: docker: fix print() showing nothing --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 4470ffc..42fa087 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,7 @@ RUN mkdir -p /var/lib/void COPY [".", "/usr/src/"] WORKDIR /usr/src -CMD ["./server.py", "--void", "/var/lib/void/void.state"] +# I don't know why, but in Docker, simple print() statements show nothing: +# https://stackoverflow.com/q/29663459 +# Fixed by adding the -u flag: +CMD ["python3", "-u", "./server.py", "--void", "/var/lib/void/void.state"] -- cgit v1.2.3