summaryrefslogtreecommitdiffstats
path: root/demo/Dockerfile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
commit5068d34c08f951a7ea6257d305a1627b09a95817 (patch)
tree08213e2be853396a3b07ce15dbe222644dcd9a89 /demo/Dockerfile
parentInitial commit. (diff)
downloadlnav-5068d34c08f951a7ea6257d305a1627b09a95817.tar.xz
lnav-5068d34c08f951a7ea6257d305a1627b09a95817.zip
Adding upstream version 0.11.1.upstream/0.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--demo/Dockerfile44
1 files changed, 44 insertions, 0 deletions
diff --git a/demo/Dockerfile b/demo/Dockerfile
new file mode 100644
index 0000000..25ded84
--- /dev/null
+++ b/demo/Dockerfile
@@ -0,0 +1,44 @@
+
+FROM debian:11.3-slim
+
+RUN set -eux; \
+ export DEBIAN_FRONTEND=noninteractive; \
+ apt update; \
+ apt install --yes --no-install-recommends bind9-dnsutils iputils-ping iproute2 curl ca-certificates htop wget unzip openssh-server; \
+ apt clean autoclean; \
+ apt autoremove --yes; \
+ rm -rf /var/lib/{apt,dpkg,cache,log}/; \
+ echo "Installed base utils!"
+
+ADD https://github.com/tstack/lnav/releases/download/v0.11.0/lnav-0.11.0-musl-64bit.zip /
+RUN unzip lnav-0.11.0-musl-64bit.zip
+
+COPY docs/tutorials tutorials
+RUN gunzip /tutorials/playground/logs/*.gz
+
+RUN useradd -rm -d /home/playground -s /bin/bash playground
+RUN echo 'playground:playground' | chpasswd
+RUN passwd -d playground
+
+RUN useradd -rm -d /home/tutorial1 -s /bin/bash tutorial1
+RUN echo 'tutorial1:tutorial1' | chpasswd
+RUN passwd -d tutorial1
+
+USER playground
+RUN /lnav-0.11.0/lnav -nN -c ":config /ui/theme monocai"
+
+USER tutorial1
+RUN /lnav-0.11.0/lnav -nN -c ":config /ui/theme monocai"
+
+USER root
+
+RUN echo 'Match User playground' >> /etc/ssh/sshd_config
+RUN echo 'ForceCommand env PATH=/lnav-0.11.0:$PATH /tutorials/playground/run.sh' >> /etc/ssh/sshd_config
+RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
+RUN echo 'Match User tutorial1' >> /etc/ssh/sshd_config
+RUN echo 'ForceCommand env PATH=/lnav-0.11.0:$PATH /tutorials/tutorial1/run.sh' >> /etc/ssh/sshd_config
+RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
+RUN service ssh start
+EXPOSE 22
+
+CMD ["/usr/sbin/sshd", "-D"]