diff --git a/docker/devenv/Dockerfile b/docker/devenv/Dockerfile index 0f6c81b44..1606306f7 100644 --- a/docker/devenv/Dockerfile +++ b/docker/devenv/Dockerfile @@ -5,8 +5,7 @@ ARG EXTERNAL_UID=1000 ENV NODE_VERSION=v10.16.0 \ LANG=en_US.UTF-8 \ - LC_ALL=C.UTF-8 \ - UXBOX_CONFIG_URL="/api" + LC_ALL=C.UTF-8 RUN set -ex; \ apt-get update && \ @@ -40,6 +39,7 @@ RUN set -ex; \ tmux \ vim \ curl \ + zsh \ ; COPY files/pg_hba.conf /etc/postgresql/9.6/main/pg_hba.conf @@ -58,7 +58,7 @@ EXPOSE 6060 EXPOSE 9090 RUN set -ex; \ - useradd -m -g users -s /bin/bash -u $EXTERNAL_UID uxbox; \ + useradd -m -g users -s /bin/zsh -u $EXTERNAL_UID uxbox; \ passwd uxbox -d; \ echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers @@ -78,10 +78,11 @@ RUN set -ex; \ bash -c "source .nvm/nvm.sh && nvm use default"; COPY files/bashrc /home/uxbox/.bashrc +COPY files/zshrc /home/uxbox/.zshrc COPY files/vimrc /home/uxbox/.vimrc COPY files/start.sh /home/uxbox/start-tmux.sh COPY files/tmux.conf /home/uxbox/.tmux.conf COPY files/entrypoint.sh /home/uxbox/ -ENTRYPOINT ["bash", "/home/uxbox/entrypoint.sh"] +ENTRYPOINT ["zsh", "/home/uxbox/entrypoint.sh"] CMD ["/home/uxbox/start-tmux.sh"] diff --git a/docker/devenv/files/entrypoint.sh b/docker/devenv/files/entrypoint.sh index f57a59b9b..419da3804 100644 --- a/docker/devenv/files/entrypoint.sh +++ b/docker/devenv/files/entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env zsh set -e echo "UXBOX Docker entrypoint initialization..." diff --git a/docker/devenv/files/start.sh b/docker/devenv/files/start.sh index 8d75f47b3..1b35e6187 100755 --- a/docker/devenv/files/start.sh +++ b/docker/devenv/files/start.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env zsh tmux -2 new-session -d -s uxbox diff --git a/docker/devenv/files/zshrc b/docker/devenv/files/zshrc new file mode 100644 index 000000000..0f4b86593 --- /dev/null +++ b/docker/devenv/files/zshrc @@ -0,0 +1,56 @@ +#!/usr/bin/env zsh + +export EDITOR=vim + +bindkey "^[[3~" delete-char +bindkey "^[3;5~" delete-char +bindkey '^R' history-incremental-search-backward + +bindkey -e + +autoload -U promptinit +promptinit +prompt zefram + +#------------------------------ +## Comp stuff +##------------------------------ +zmodload zsh/complist +autoload -Uz compinit +compinit + +#------------------------------ +# Alias stuff +#------------------------------ +alias cp='cp -r' +alias ls='ls -F' +alias l='ls -Flha' +alias rm='rm -r' +alias ls='ls --color -F' +alias lsd='ls -d *(/)' +alias lsf='ls -h *(.)' + +#----------------- +# Options +#----------------- + +setopt AUTO_CD # implicate cd for non-commands +setopt CORRECT_ALL # correct spelling +setopt COMPLETE_IN_WORD # complete commands anywhere in the word +setopt NOTIFY # Notify when jobs finish +setopt BASH_AUTO_LIST # Autolist options on repeition of ambiguous args +setopt AUTO_PUSHD # Push dirs into history +setopt MULTIOS # Allow Multiple pipes +setopt MAGIC_EQUAL_SUBST # Expand inside equals +setopt EXTENDED_GLOB +setopt NOBEEP +setopt INC_APPEND_HISTORY +export HISTSIZE=100000 +export SAVEHIST=100000 +export HISTFILE=~/.zhistory +setopt hist_ignore_all_dups +setopt hist_ignore_space + +export PATH=$HOME/.local/bin:$PATH +export NVM_DIR="/home/uxbox/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm