Skip to content

Commit

Permalink
Try to fix install in docker, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvcc committed Jul 2, 2024
1 parent 5a56982 commit 0779987
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 46 deletions.
40 changes: 10 additions & 30 deletions .cfg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,19 @@ FROM ubuntu:22.04
WORKDIR /root

# ubuntu only
RUN apt update
RUN apt install -y curl git build-essential

RUN apt update --fix-missing
RUN apt install -y curl git build-essential zsh

# Install brew
RUN curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | env NONINTERACTIVE=1 bash

RUN echo 'export PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"' >> "$HOME/.bashrc"
ENV PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"

RUN brew doctor

# Xclip ubuntu only
RUN brew install unzip xclip vim neovim
ENV NONINTERACTIVE=1
RUN curl -Lks -o install.sh https://raw.githubusercontent.com/dhvcc/configs/master/.cfg/install.sh && \
chmod +x install.sh && \
./install.sh && \
zsh -c "$HOME/.cfg/setup.sh"

RUN brew install starship neofetch fzf btop wget \
pyenv nvm \
lsd fd ripgrep bat `# rust utils`
#RUN echo 'export PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"' >> "$HOME/.bashrc"
#ENV PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"

# INSTALL VIM THINGS
RUN curl -fLo '~/.vim/autoload/plug.vim' --create-dirs \
'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

RUN curl -Lks https://raw.githubusercontent.com/dhvcc/configs/master/.cfg/install.sh | /bin/sh

# Install manually or in script
#ENV NVM_DIR="$HOME/.nvm"
#RUN test -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" && . "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh"; nvm install 16

# ubuntu only
RUN apt install -y zsh
#
RUN "$HOME/.cfg/scripts/install-omb.sh"
RUN "$HOME/.cfg/scripts/install-omz.sh"
#RUN "$HOME/.cfg/setup.sh"

CMD bash
2 changes: 0 additions & 2 deletions .cfg/scripts/install-neovim.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env zsh

export PATH="/home/linuxbrew/.linuxbrew/bin:/opt/homebrew/bin:$PATH"

curl -fLo '~/.vim/autoload/plug.vim' --create-dirs \
'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

Expand Down
3 changes: 0 additions & 3 deletions .cfg/scripts/install-omb.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env bash

export OSH=$HOME/.oh-my-bash
source $OSH/oh-my-bash.sh

bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)" --unattended
mv -f .bashrc.omb* .bashrc
12 changes: 3 additions & 9 deletions .cfg/scripts/install-omz.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#!/usr/bin/env zsh

export ZSH="$HOME/.oh-my-zsh"
export ZSH_CUSTOM="$HOME/.oh-my-zsh-custom"
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#d1d1d1,bg=#525252"
fpath+="$ZSH_CUSTOM/plugins/zsh-completions/src"
source $ZSH/oh-my-zsh.sh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --keep-zshrc --unattended

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
git clone https://github.com/zsh-users/zsh-autosuggestions "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions"
git clone https://github.com/zsh-users/zsh-completions "$HOME/.oh-my-zsh/custom/plugins/zsh-completions"
5 changes: 3 additions & 2 deletions .cfg/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ if test -f "$(which apt)"; then
${CMD} apt install -y zsh
fi

export PATH="/home/linuxbrew/.linuxbrew/bin:/opt/homebrew/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"

./.cfg/scripts/install-brew.sh
./.cfg/scripts/install-packages.sh

export PATH="$HOME/.local/bin:$PATH"

pip3 install pipx
pipx install poetry --include-deps
pipx install ansible --include-deps
Expand Down

0 comments on commit 0779987

Please sign in to comment.