deluan/zsh-in-docker
소개
한 줄로 Docker 컨테이너 안에 Zsh, Oh My Zsh 및 플러그인을 설치하세요!
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalOh My Zsh Installer for Docker
This is a script to automate Oh My Zsh installation in development containers. Works with any image based on Alpine, Ubuntu, Debian, Amazon Linux, RockyLinux 8,9 and Fedora.
The original goal was to simplify setting up zsh and Oh My Zsh in a Docker image for use with VSCode's Remote Containers
extension, but it can be used whenever you
need a simple way to install Oh My Zsh and its plugins in a Docker image
Usage
One line installation: add the following line in your Dockerfile:
# Default powerline10k theme, no plugins installed
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)"
Optional arguments:
-t <theme>- Selects the theme to be used. Options are available here. By default the script installs and uses Powerlevel10k, one of the "fastest and most awesome" themes forzsh. This is my recommended theme. If<theme>is a url, the script will try to install the theme usinggit clone.-p <plugin>- Specifies a plugin to be configured in the generated.zshrc. List of bundled Oh My Zsh plugins are available here. If<plugin>is a url, the script will try to install the plugin usinggit clone.-a <line>- You can add extra lines at the end of the generated.zshrc(but before loading oh-my-zsh) by passing one-aargument for each line you want to add. This is useful to customize plugins or themes. For example, if you want to enable case sensitive completion:RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)" -- \ -a 'CASE_SENSITIVE="true"'-x- Skip installation of dependencies:zsh,git,curl. If you are having issues with the script failing to install these dependencies due to sudo permissions, you can install them yourself in a prior step, and use this flag to make the script skip their installation
Examples:
# Uses "robbyrussell" theme (original Oh My Zsh theme), with no plugins
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)" -- \
-t robbyrussell
# Uses "git", "ssh-agent" and "history-substring-search" bundled plugins
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)" -- \
-p git -p ssh-agent -p 'history-substring-search' \
-a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \
-a 'bindkey "\$terminfo[kcud1]" history-substring-search-down'
# Uses "Spaceship" theme with some customization. Uses some bundled plugins and installs some more from github
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)" -- \
-t https://github.com/denysdovhan/spaceship-prompt \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-p git \
-p ssh-agent \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions
Notes
- The examples above use
wget, but if you prefercurl, just replacewget -O-withcurl -L - This scripts requires
gitandcurlto work properly. If yourDockerfileusesrootas the main user, it should be fine, as the script will install them automatically. If you are using a non-root user, make sure to install thesudopackage OR to installgitandcurlpackages before calling this script. In casesudoaccess is an issue and you already havezsh,gitandcurl, you can use the option-xto skip the installations. - By default this script will install the
powerlevel10ktheme, as it is one of the fastest and most customizable themes available for zsh. If you want the default Oh My Zsh theme, use the option-t robbyrussell
Liked it?
If you like this script, feel free to thank me with a coffee (or a beer :wink:):
관련 프로젝트 살펴보기
불러오는 중…