├── README.md ├── Dockerfile └── home └── .bashrc /README.md: -------------------------------------------------------------------------------- 1 | # Docker Package image 2 | 3 | https://hub.docker.com/r/natanfelles/package 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM natanfelles/php-base 2 | RUN apt-get update \ 3 | && apt-get -y --no-install-recommends install \ 4 | bash-completion \ 5 | sudo \ 6 | vim \ 7 | && apt-get clean \ 8 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*; \ 9 | useradd -rm \ 10 | -d /home/developer \ 11 | -g root -G sudo \ 12 | -p $(openssl passwd -1 "password") \ 13 | -s /bin/bash \ 14 | -u 1000 developer 15 | COPY --chown=1000 home /home/developer 16 | USER developer 17 | CMD ["bash"] 18 | -------------------------------------------------------------------------------- /home/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | parse_git_branch() { 27 | git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' 28 | } 29 | 30 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \[\033[01;33m\]$(parse_git_branch)\[\033[00m\]\n\[\033[31m\]\$ \[\033[00m\]' 31 | 32 | alias ls='ls --color=auto' 33 | alias grep='grep --color=auto' 34 | 35 | # enable programmable completion features (you don't need to enable 36 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 37 | # sources /etc/bash.bashrc). 38 | if ! shopt -oq posix; then 39 | if [ -f /usr/share/bash-completion/bash_completion ]; then 40 | . /usr/share/bash-completion/bash_completion 41 | elif [ -f /etc/bash_completion ]; then 42 | . /etc/bash_completion 43 | fi 44 | fi 45 | 46 | export PATH="$PATH:$HOME/.config/composer/vendor/bin" 47 | --------------------------------------------------------------------------------