Skip to content

Commit

Permalink
changed to python tools in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jintonic committed Apr 4, 2024
1 parent 315215b commit f7f7015
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions INSTALL/Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@ RUN cd /usr/bin \
&& curl -LO https://github.com/jintonic/gears/raw/master/Makefile \
&& make && rm -f gears.cc Makefile

# install command-line tools: tmux, git, lf, micro, asciigraph, sc-im
# byacc and ncurses-devel are needed for compiling sc-im
run dnf install -y byacc ncurses-devel tmux git \
# install command-line tools: tmux, git, lf, micro, uproot, visidata, mpld3
run dnf install -y tmux git python3-pip \
&& cd /usr/local/bin && curl https://getmic.ro/r | bash \
&& curl -LO https://github.com/gokcehan/lf/releases/download/r31/lf-linux-amd64.tar.gz \
&& tar xf *.gz && rm -f *.gz \
&& curl -LO https://github.com/andmarti1424/sc-im/archive/refs/tags/v0.8.3.tar.gz \
&& tar xf *.gz && cd sc*/src && make && make install && cd ../.. && rm -fr *0.8* \
&& curl -LO https://github.com/guptarohit/asciigraph/releases/download/v0.6.0/asciigraph_0.6.0_Linux_x86_64.tar.gz \
&& tar xf *.gz && rm -f *.gz LICENSE *.md \
&& dnf clean all && rm -fr /var/cache/*
&& tar xf *.gz && rm -f *.gz && dnf clean all && rm -fr /var/cache/* \
&& pip install uproot visidata mpld3 && rm -fr /root/.cache

# set up environment
copy tmux.conf /root/.tmux.conf
copy tmux.conf /etc/
copy config /root/.config
# tmux uses $PS1 defined in .bashrc to show its prompt
run cd /root && rm -f .*cshrc && sed -i 's/"ls -Alh"/lf/' .bashrc \
&& echo 'export PS1="\[\e[0;32m\]\u@Geant4:\[\e[0;34m\]\w \[\e[0;31m\]\$\[\e[m\] "' >> .bashrc \
&& echo 'alias t="tmux -u"' >> .bashrc \
&& echo 'alias ta="t attach"' >> .bashrc \
&& echo 'alias a="asciigraph -h 15 -w 60"' >> .bashrc \
&& echo 'alias s=sc-im' >> .bashrc \
&& sed -i 's/bash/tmux -u a/' .profile
run cd /etc && sed -i 's/"ls -Alh"/lf/' bashrc \
&& echo 'export PS1="\[\e[0;32m\]\u@AlmaLinux:\[\e[0;34m\]\w \[\e[0;31m\]\$\[\e[m\] "' >> bashrc \
&& echo 'alias t="tmux -u"' >> bashrc \
&& echo 'alias ta="t attach"' >> bashrc \
&& echo 'You are using /bin/sh' >> profile \
&& echo 'Type "tmux -u a↵" for a better UI' >> profile

# lf started by tmux uses vi without the following line
env EDITOR=micro

volume /geant4/data
expose 8000
expose 8888

# https://askubuntu.com/a/746846
# https://kodekloud.com/blog/keep-docker-container-running
cmd tmux -u new -d lf && tail -12f /usr/README

0 comments on commit f7f7015

Please sign in to comment.