style (dev/john): Clean up Dockerfile

* Indent command chains
This commit is contained in:
John Colvin committed 2021-11-19 16:30:58 -05:00
1 parent c2a783ce96
commit 644613749d
1 file changed
+54 -43
+54 -43
View File
@@ -1,14 +1,14 @@
FROM spark-crypto
FROM spark-crypto_18.04
# RUN echo "BT5u53r" | sudo -S apt-get install -y \
RUN apt-get install -y \
htop \
locales \
source-highlight \
powerline \
powerline-gitstatus \
fonts-powerline \
fish
htop \
locales \
source-highlight \
powerline \
powerline-gitstatus \
fonts-powerline \
fish
# Hide these in the .docker directory to avoid conflicts with existing repos on
@@ -18,75 +18,86 @@ ARG repo_root="/home/john/Documents/repos/.docker"
# Create dirs for public/private repos
USER john
RUN mkdir -p $repo_root/public && \
mkdir -p $repo_root/private
RUN \
mkdir -p $repo_root/public \
&& mkdir -p $repo_root/private
## Get latest fish (build from source)
# 1) get build deps
USER root
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common
RUN apt-add-repository ppa:fish-shell/release-3 && \
sed -i "s/^# deb/deb/g" /etc/apt/sources.list
RUN \
apt-add-repository ppa:fish-shell/release-3 \
&& sed -i "s/^# deb/deb/g" /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get build-dep -y fish
# 2) Clone repo
USER john
RUN cd $repo_root/public && \
git clone https://github.com/fish-shell/fish-shell.git
RUN \
cd $repo_root/public \
&& git clone https://github.com/fish-shell/fish-shell.git
RUN cd $repo_root/public/fish-shell && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
cmake --build .
RUN \
cd $repo_root/public/fish-shell \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& cmake --build .
# Switch to root, rather than running inline w/ sudo cmd, to avoid having to
# enter a password
USER root
RUN cd $repo_root/public/fish-shell/build && make install
RUN \
cd $repo_root/public/fish-shell/build \
&& make install
USER john
## Get oh-my-fish
RUN cd $repo_root/public && \
git clone https://github.com/oh-my-fish/oh-my-fish.git
RUN \
cd $repo_root/public \
&& git clone https://github.com/oh-my-fish/oh-my-fish.git
RUN cd $repo_root/public/oh-my-fish && \
./bin/install --noninteractive --yes
RUN \
cd $repo_root/public/oh-my-fish \
&& ./bin/install --noninteractive --yes
## Get my fish config
RUN cd $repo_root/private && \
git clone https://github.com/johncolvin-og/myfishconfig
RUN \
cd $repo_root/private \
&& git clone https://github.com/johncolvin-og/myfishconfig
RUN cd $repo_root/private/myfishconfig && \
cp src/config.fish /home/john/.config/fish/ && \
cp src/aliases.fish /home/john/.config/fish/ && \
cp -r src/functions /home/john/.config/fish/ && \
cp -r src/themes/johncolvin /home/john/.local/share/omf/themes/ && \
fish --command "omf theme johncolvin"
RUN \
cd $repo_root/private/myfishconfig \
&& cp src/config.fish /home/john/.config/fish/ \
&& cp src/aliases.fish /home/john/.config/fish/ \
&& cp -r src/functions /home/john/.config/fish/ \
&& cp -r src/themes/johncolvin /home/john/.local/share/omf/themes/ \
&& fish --command "omf theme johncolvin"
## Get my bash config (back up existing)
RUN
mkdir -p /home/john/.docker_orig_rc && \
cp /home/john/*.rc /home/john/.docker_orig_rc/ && \
cp /home/john/.profile /home/john/.docker_orig_rc/ && \
cd $repo_root/private && \
git clone https://github.com/johncolvin-og/mybashconfig && \
cd mybashconfig && \
cp src/* /home/john/
RUN \
mkdir -p /home/john/.docker_orig_rc \
&& cp /home/john/*.rc /home/john/.docker_orig_rc/ \
&& cp /home/john/.profile /home/john/.docker_orig_rc/ \
&& cd $repo_root/private \
&& git clone https://github.com/johncolvin-og/mybashconfig \
&& cd mybashconfig \
&& cp src/* /home/john/
# Get vim files/tools
USER root
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y curl
RUN \
DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y curl
USER john
curl -fLo home/john/.vim/autoload/plug.vim --create-dirs \
RUN curl -fLo home/john/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim