Skip to content

Commit e4e8f5a

Browse files
committed
Add rlwrap to the Docker CMD
rlwrap adds command history and command line editing to the GDPR API tester command line.
1 parent a5e354a commit e4e8f5a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ LABEL org.opencontainers.image.source=https://github.com/City-of-Helsinki/profil
44
LABEL org.opencontainers.image.description="Helsinki Profile GDPR API Tester"
55
LABEL org.opencontainers.image.licenses=MIT
66

7+
RUN set -eux; \
8+
apt-get update; \
9+
apt-get install -y --no-install-recommends rlwrap
10+
711
WORKDIR /app
812

913
COPY requirements.txt requirements.txt
@@ -14,4 +18,6 @@ COPY /gdpr_api_tester /app/gdpr_api_tester
1418

1519
EXPOSE 8888
1620

17-
CMD ["python", "-m", "gdpr_api_tester"]
21+
# The sleep is needed to make rlwrap work. Without the sleep rlwrap can't determine the terminal dimensions.
22+
# See this issue for more information: https://github.com/moby/moby/issues/28009
23+
CMD sleep 0.1; rlwrap python -m gdpr_api_tester

0 commit comments

Comments
 (0)