mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
feat: use zsh as default shell on docker devenv
This commit is contained in:
parent
fd516fee56
commit
cff438eccc
4 changed files with 63 additions and 6 deletions
|
@ -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"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env zsh
|
||||
set -e
|
||||
echo "UXBOX Docker entrypoint initialization..."
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
tmux -2 new-session -d -s uxbox
|
||||
|
||||
|
|
56
docker/devenv/files/zshrc
Normal file
56
docker/devenv/files/zshrc
Normal file
|
@ -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
|
Loading…
Reference in a new issue