|
| 1 | +FROM mcr.microsoft.com/devcontainers/base:ubuntu |
| 2 | + |
| 3 | +# Instalar dependências do sistema |
| 4 | +RUN apt update && \ |
| 5 | + apt install -y software-properties-common && \ |
| 6 | + add-apt-repository -y ppa:neovim-ppa/unstable && \ |
| 7 | + apt update && \ |
| 8 | + apt upgrade -y && \ |
| 9 | + apt -y install --no-install-recommends \ |
| 10 | + build-essential \ |
| 11 | + curl \ |
| 12 | + git \ |
| 13 | + tmux \ |
| 14 | + zsh \ |
| 15 | + libssl-dev \ |
| 16 | + libffi-dev \ |
| 17 | + python3-dev \ |
| 18 | + pkg-config \ |
| 19 | + gcc \ |
| 20 | + g++ \ |
| 21 | + make \ |
| 22 | + cmake \ |
| 23 | + libcurl4-openssl-dev \ |
| 24 | + libsqlite3-dev \ |
| 25 | + default-libmysqlclient-dev && \ |
| 26 | + apt install -y neovim && \ |
| 27 | + apt clean -y && \ |
| 28 | + rm -rf /var/lib/apt/lists/* && \ |
| 29 | + chsh -s /bin/zsh |
| 30 | + |
| 31 | +# Configurar o usuário vscode |
| 32 | +USER vscode |
| 33 | +WORKDIR /home/vscode |
| 34 | + |
| 35 | +# Instalar uv e ferramentas Python |
| 36 | +RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \ |
| 37 | + export PATH="/home/vscode/.local/bin:$PATH" && \ |
| 38 | + . "/home/vscode/.local/bin/env" && \ |
| 39 | + echo 'export PATH="/home/vscode/.local/bin:$PATH"' >> ~/.zshrc && \ |
| 40 | + echo 'source "/home/vscode/.local/bin/env"' >> ~/.zshrc |
| 41 | + |
| 42 | +# Instalar versões do Python e ferramentas |
| 43 | +RUN export PATH="/home/vscode/.local/bin:$PATH" && \ |
| 44 | + . "/home/vscode/.local/bin/env" && \ |
| 45 | + uv python install 3.11 3.12 3.13 && \ |
| 46 | + uv tool install ruff && \ |
| 47 | + uv tool install tox --with tox-uv |
| 48 | + |
| 49 | +# Configurar Git |
| 50 | +RUN git config --global user.name "Emerson Delatorre" && \ |
| 51 | + git config --global user.email "[email protected]" |
| 52 | + |
| 53 | +# Instalar fontes Nerd Fonts |
| 54 | +RUN git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git && \ |
| 55 | + cd nerd-fonts && \ |
| 56 | + ./install.sh FiraCode && \ |
| 57 | + ./install.sh JetBrainsMono && \ |
| 58 | + cd .. && \ |
| 59 | + rm -rf nerd-fonts |
| 60 | + |
| 61 | +# Instalar e configurar fzf |
| 62 | +RUN git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && \ |
| 63 | + ~/.fzf/install --all |
| 64 | + |
| 65 | +# Install Rust |
| 66 | +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 67 | + |
| 68 | +# Adicionar binários Rust ao PATH |
| 69 | +ENV PATH="/home/vscode/.cargo/bin:${PATH}" |
| 70 | +ENV RUSTUP_HOME=/home/vscode/.rustup |
| 71 | +ENV CARGO_HOME=/home/vscode/.cargo |
| 72 | + |
| 73 | +# Instalar EZA |
| 74 | +RUN . "$HOME/.cargo/env" && cargo install eza |
| 75 | + |
| 76 | +# Instalar plugins do ZSH |
| 77 | +RUN mkdir -p ~/.zsh && \ |
| 78 | + git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions && \ |
| 79 | + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting && \ |
| 80 | + git clone https://github.com/zsh-users/zsh-history-substring-search.git ~/.zsh/zsh-history-substring-search |
| 81 | + |
| 82 | +# Instalar Oh My Zsh e tema |
| 83 | +RUN rm -rf ~/.oh-my-zsh && \ |
| 84 | + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended && \ |
| 85 | + mkdir -p ~/.oh-my-zsh/custom/themes && \ |
| 86 | + git clone --depth=1 https://github.com/spaceship-prompt/spaceship-prompt.git ~/.oh-my-zsh/custom/themes/spaceship-prompt && \ |
| 87 | + ln -s ~/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme ~/.oh-my-zsh/custom/themes/spaceship.zsh-theme |
| 88 | + |
| 89 | +RUN echo 'export GPG_TTY=$(tty)' >> ~/.zshrc && \ |
| 90 | + echo '' >> ~/.zshrc && \ |
| 91 | + echo 'ZSH_THEME="spaceship"' >> ~/.zshrc && \ |
| 92 | + echo '' >> ~/.zshrc && \ |
| 93 | + echo '#plugins:' >> ~/.zshrc && \ |
| 94 | + echo 'source ~/.cargo/env' >> ~/.zshrc && \ |
| 95 | + echo 'source ~/.oh-my-zsh/oh-my-zsh.sh' >> ~/.zshrc && \ |
| 96 | + echo 'source ~/.local/bin/env' >> ~/.zshrc && \ |
| 97 | + echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc && \ |
| 98 | + echo 'source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc && \ |
| 99 | + echo 'source ~/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh' >> ~/.zshrc && \ |
| 100 | + echo '' >> ~/.zshrc && \ |
| 101 | + echo '[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh' >> ~/.zshrc && \ |
| 102 | + echo '' >> ~/.zshrc && \ |
| 103 | + echo 'plugins=(' >> ~/.zshrc && \ |
| 104 | + echo ' dircycle' >> ~/.zshrc && \ |
| 105 | + echo ' git' >> ~/.zshrc && \ |
| 106 | + echo ' gitignore' >> ~/.zshrc && \ |
| 107 | + echo ' pip' >> ~/.zshrc && \ |
| 108 | + echo ' pre-commit' >> ~/.zshrc && \ |
| 109 | + echo ' python' >> ~/.zshrc && \ |
| 110 | + echo ' poetry' >> ~/.zshrc && \ |
| 111 | + echo ' ssh-agent' >> ~/.zshrc && \ |
| 112 | + echo ' ubuntu' >> ~/.zshrc && \ |
| 113 | + echo ' vscode' >> ~/.zshrc && \ |
| 114 | + echo ')' >> ~/.zshrc && \ |
| 115 | + echo '' >> ~/.zshrc && \ |
| 116 | + echo 'zstyle :omz:plugins:ssh-agent identities id_ed25519' >> ~/.zshrc && \ |
| 117 | + echo 'zstyle '\'':completion:*:*:docker:*'\'' option-stacking yes' >> ~/.zshrc && \ |
| 118 | + echo 'zstyle '\'':completion:*:*:docker-*:*'\'' option-stacking yes' >> ~/.zshrc && \ |
| 119 | + echo '' >> ~/.zshrc && \ |
| 120 | + echo '#settings for zsh-history-substring-search' >> ~/.zshrc && \ |
| 121 | + echo 'bindkey '\''^[[A'\'' history-substring-search-up' >> ~/.zshrc && \ |
| 122 | + echo 'bindkey '\''^[[B'\'' history-substring-search-down' >> ~/.zshrc && \ |
| 123 | + echo 'bindkey '\''^[[1;4D'\'' insert-cycledleft' >> ~/.zshrc && \ |
| 124 | + echo 'bindkey '\''^[[1;4C'\'' insert-cycledright' >> ~/.zshrc && \ |
| 125 | + echo '' >> ~/.zshrc && \ |
| 126 | + echo '#alias:' >> ~/.zshrc && \ |
| 127 | + echo 'alias zshconfig="code ~/.zshrc"' >> ~/.zshrc && \ |
| 128 | + echo 'alias ohmyzsh="code ~/.oh-my-zsh"' >> ~/.zshrc && \ |
| 129 | + echo 'alias pbcopy="xclip -selection clipboard"' >> ~/.zshrc && \ |
| 130 | + echo 'alias pbpaste="xclip -selection clipboard -o"' >> ~/.zshrc && \ |
| 131 | + echo 'alias cls="clear"' >> ~/.zshrc && \ |
| 132 | + echo 'alias ls="eza -la"' >> ~/.zshrc |
| 133 | + |
| 134 | +# Configurar o PATH permanentemente |
| 135 | +ENV PATH="/home/vscode/.local/bin:$PATH" |
| 136 | + |
| 137 | +# ... rest of the file remains unchanged ... |
0 commit comments