-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!install_custom.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM alpine:3.10 | ||
|
||
LABEL maintainer="Miguel Pérez <https://github.com/mperezi>" | ||
|
||
ENV TERM xterm-256color | ||
|
||
RUN apk add --no-cache \ | ||
git curl less bash zsh vim python3 \ | ||
zsh-vcs fzf docker-cli && \ | ||
rm -rf /usr/share/vim/vim*/doc && \ | ||
find /usr/lib/python3* -type d -name __pycache__ | xargs rm -rf | ||
RUN ln -sf /usr/bin/python3 /usr/bin/python | ||
|
||
COPY install_custom.sh /usr/bin/install_custom.sh | ||
RUN /usr/bin/install_custom.sh | ||
|
||
RUN bash -c "$(curl -sL https://raw.githubusercontent.com/mperezi/dotfiles/master/install.sh)" && \ | ||
find $HOME/.dotfiles -type d -name .git | xargs rm -rf && \ | ||
rm -rf $HOME/.dotfiles/macos | ||
|
||
CMD ["/bin/zsh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# dotbox | ||
|
||
> Run a full-fledged dotfiles environment with a single command | ||
## Features | ||
|
||
- Based on Alpine Linux | ||
- Zsh (+syntax-highlighting +autosuggestions) | ||
- Vim 8 (+linters +git) | ||
- Git | ||
- fzf (+history-bindings) | ||
- Docker CLI | ||
- Awesome tools: autojump, bat, fd, ripgrep | ||
- Lightweight: just under 200 MB! | ||
|
||
## Usage | ||
|
||
```bash | ||
$ docker run \ | ||
--rm -it \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v dotbox-data:/root/.local \ | ||
mperezi/dotbox:latest | ||
``` | ||
|
||
Please note that: | ||
|
||
* You can run Docker commands _on the host_ by mounting the unix socket exposed by your Docker daemon and available through /var/run/docker.sock. | ||
* As Docker containers are stateless by default, data generated in a session like shell history or the autojump database would be lost when you exit the shell and therefore the container ceases to exist. You can use a named volume (e.g. dotbox-data) to persist this data across sessions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
RIPGREP_RELEASE_URL="https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep-11.0.2-x86_64-unknown-linux-musl.tar.gz" | ||
TAG_RELEASE_URL="https://github.com/aykamko/tag/releases/download/v1.4.0/tag_linux_386.tar.gz" | ||
BAT_RELEASE_URL="https://github.com/sharkdp/bat/releases/download/v0.12.1/bat-v0.12.1-x86_64-unknown-linux-musl.tar.gz" | ||
FD_RELEASE_URL="https://github.com/sharkdp/fd/releases/download/v7.4.0/fd-v7.4.0-x86_64-unknown-linux-musl.tar.gz" | ||
|
||
install_autojump() { | ||
echo "Installing autojump..." | ||
cd /tmp | ||
git clone git://github.com/wting/autojump.git | ||
cd autojump | ||
SHELL=$(command -v zsh) ./install.py -s | ||
} | ||
|
||
install_ripgrep() { | ||
echo "Installing ripgrep..." | ||
curl -sL $RIPGREP_RELEASE_URL | | ||
tar xvzf - \ | ||
-C /usr/local/bin \ | ||
--strip-components=1 \ | ||
ripgrep-11.0.2-x86_64-unknown-linux-musl/rg | ||
} | ||
|
||
install_tag() { | ||
echo "Installing tag..." | ||
curl -sL $TAG_RELEASE_URL | tar xvzf - -C /usr/local/bin tag | ||
} | ||
|
||
install_bat() { | ||
echo "Installing bat..." | ||
curl -sL $BAT_RELEASE_URL | | ||
tar xvzf - \ | ||
-C /usr/local/bin \ | ||
--strip-components=1 \ | ||
bat-v0.12.1-x86_64-unknown-linux-musl/bat | ||
} | ||
|
||
install_fd() { | ||
echo "Installing fd..." | ||
curl -sL $FD_RELEASE_URL | | ||
tar xvzf - \ | ||
-C /usr/local/bin \ | ||
--strip-components=1 \ | ||
fd-v7.4.0-x86_64-unknown-linux-musl/fd | ||
} | ||
|
||
install_autojump | ||
install_ripgrep | ||
install_tag | ||
install_bat | ||
install_fd |