Skip to content

Commit 3dc53bb

Browse files
authored
Merge pull request #68 from corememltd/canihaztty
rlwrap should only be used when connected to a terminal
2 parents 3ac26e5 + dd7b259 commit 3dc53bb

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

docker/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ FROM base
3232

3333
ARG VCS_REF=dev
3434
ARG BUILD_DATE=dev
35+
ARG L64_URL=https://cl.ly/2r1v1v3h0l41/download/l64.zip
3536
ARG L64_SHA256=28c26f796a7fa9267a3061598fe0e1e34208b4deb5932db42adc78f9d2a74481
3637

3738
LABEL org.label-schema.schema-version="1.0" \
@@ -62,11 +63,11 @@ ENV QHOME=/opt/kx/q
6263
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/opt/conda/lib
6364

6465
RUN mkdir -p $QHOME
65-
RUN curl -o $QHOME/l64.zip -L https://cl.ly/2r1v1v3h0l41/download/l64.zip \
66-
&& [ "$L64_SHA256" = "$(sha256sum $QHOME/l64.zip | cut -b1-64)" ] \
67-
&& unzip -d $QHOME $QHOME/l64.zip \
68-
&& rm $QHOME/l64.zip \
69-
&& apt-get -yy --option=Dpkg::options::=--force-unsafe-io purge unzip
66+
RUN curl -f -o /tmp/l64.zip -L $L64_URL \
67+
&& [ "$L64_SHA256" = "$(sha256sum /tmp/l64.zip | cut -b1-64)" ] \
68+
&& unzip -d $QHOME /tmp/l64.zip \
69+
&& rm /tmp/l64.zip \
70+
&& apt-get -yy --option=Dpkg::options::=--force-unsafe-io purge unzip
7071
COPY docker/q.wrapper /usr/local/bin/q
7172
COPY docker/kc.lic.py /opt/kx/
7273

docker/q.wrapper

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
set -eu
44

5-
exec rlwrap $QHOME/l64/q "$@"
5+
[ -t 0 ] && RLWRAP=rlwrap || RLWRAP=
6+
7+
exec $RLWRAP "$QHOME/l64/q" "$@"

0 commit comments

Comments
 (0)