mirror of
https://github.com/MSWS/Homelab.git
synced 2025-12-05 23:00:24 -08:00
build: Configure dev tools and add VPN setup instructions
- Add commented-out `gluetun` service configuration in `navidrome/compose.yml` with detailed setup instructions and references to external documentation. - Update `code-server/Dockerfile` by removing unstable Neovim PPA, adding `cargo` installation, configuring PATH for Cargo binaries, and installing `gptcommit`. - Add new Git aliases (`ca` and `c`), update `.config` copy process, and revise VSCode extension installation script. [navidrome/compose.yml] - Added a commented-out service configuration for `gluetun`. - The configuration includes setup instructions, such as enabling external container connection, assigning permissions, and specifying required devices and ports. - Environment variables for VPN setup (OpenVPN/Wireguard), timezone, and server updater are included. - Provides references to external documentation for further details. [code-server/Dockerfile] - Removed addition of the unstable Neovim PPA repository. - Added `cargo` package installation to the dependency list. - Configured the `PATH` environment variable to include Cargo's binary directory. - Installed the `gptcommit` tool using Cargo. - Added new Git aliases for quicker commit commands (`ca` and `c`). - Added configuration to copy `.config` directory during the build process. - Updated the location of the VSCode extension installation command to use a more generic `/usr/local/bin/install-extension` script, and commented out the related installation block, possibly for future updates or changes to extension installation logic.
This commit is contained in:
@@ -10,11 +10,13 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN apt-get update && \
|
||||
apt-get install -y software-properties-common && \
|
||||
add-apt-repository -y ppa:git-core/ppa && \
|
||||
add-apt-repository ppa:neovim-ppa/unstable && \
|
||||
apt-get update && \
|
||||
apt-get install -y texlive-full curl wget git zoxide && \
|
||||
apt-get install -y texlive-full curl wget git zoxide cargo && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH="$PATH:/config/.cargo/bin"
|
||||
RUN cargo install --locked gptcommit
|
||||
|
||||
# Set global git config
|
||||
RUN git config --global user.name MSWS && \
|
||||
git config --global user.email imodmaker@gmail.com && \
|
||||
@@ -22,7 +24,9 @@ RUN git config --global user.name MSWS && \
|
||||
git config --global push.autoSetupRemote true && \
|
||||
git config --global user.signingKey ~/.ssh/github && \
|
||||
git config --global commit.gpgsign true && \
|
||||
git config --global gpg.format ssh
|
||||
git config --global gpg.format ssh && \
|
||||
git config --global alias.ca "commit -ca" && \
|
||||
git config --global alias.c "commit -a"
|
||||
|
||||
RUN git clone https://github.com/MSWS/nvim-config.git /config/.config/nvim
|
||||
|
||||
@@ -30,17 +34,18 @@ RUN git clone https://github.com/MSWS/nvim-config.git /config/.config/nvim
|
||||
RUN mkdir -p /config/.ssh/ && chmod 0700 /config/.ssh/
|
||||
|
||||
COPY --chown=abc:abc .ssh /config/.ssh
|
||||
COPY --chown=abc:abc .config /config/.config
|
||||
COPY extensions /extensions
|
||||
|
||||
RUN echo "eval \"\$(zoxide init bash)\"" >> /config/.bashrc
|
||||
|
||||
# Install VSCode extensions
|
||||
RUN /app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension James-Yu.latex-workshop && \
|
||||
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension WakaTime.vscode-wakatime && \
|
||||
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension ms-python.python && \
|
||||
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension ms-vscode.live-server && \
|
||||
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension vscodevim.vim && \
|
||||
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension asvetliakov.vscode-neovim && \
|
||||
for file in ./extensions/*.vsix; do \
|
||||
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension $file; \
|
||||
done
|
||||
# RUN /usr/local/bin/install-extension James-Yu.latex-workshop && \
|
||||
# /usr/local/bin/install-extension WakaTime.vscode-wakatime && \
|
||||
# /usr/local/bin/install-extension ms-python.python && \
|
||||
# /usr/local/bin/install-extension ms-vscode.live-server && \
|
||||
# /usr/local/bin/install-extension vscodevim.vim && \
|
||||
# /usr/local/bin/install-extension asvetliakov.vscode-neovim && \
|
||||
# for file in ./extensions/*.vsix; do \
|
||||
# /usr/local/bin/install-extension $file; \
|
||||
# done
|
||||
|
||||
@@ -93,6 +93,37 @@ services:
|
||||
- tor
|
||||
- cloudflared
|
||||
|
||||
# gluetun:
|
||||
# image: qmcgaw/gluetun
|
||||
# # container_name: gluetun
|
||||
# # line above must be uncommented to allow external containers to connect.
|
||||
# # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
|
||||
# cap_add:
|
||||
# - NET_ADMIN
|
||||
# devices:
|
||||
# - /dev/net/tun:/dev/net/tun
|
||||
# ports:
|
||||
# - 8888:8888/tcp # HTTP proxy
|
||||
# - 8388:8388/tcp # Shadowsocks
|
||||
# - 8388:8388/udp # Shadowsocks
|
||||
# volumes:
|
||||
# - gluetun-data:/gluetun
|
||||
# environment:
|
||||
# # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
|
||||
# - VPN_SERVICE_PROVIDER=ivpn
|
||||
# - VPN_TYPE=openvpn
|
||||
# # OpenVPN:
|
||||
# - OPENVPN_USER=
|
||||
# - OPENVPN_PASSWORD=
|
||||
# # Wireguard:
|
||||
# # - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU=
|
||||
# # - WIREGUARD_ADDRESSES=10.64.222.21/32
|
||||
# # Timezone for accurate log times
|
||||
# - TZ=Etc/UTC
|
||||
# # Server list updater
|
||||
# # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
|
||||
# - UPDATER_PERIOD=24h
|
||||
|
||||
networks:
|
||||
cloudflared:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user