-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add lazygit for devconatiner remove expose ports from dockerfile
- Loading branch information
1 parent
e3544a7
commit 3f53357
Showing
3 changed files
with
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "Adguard", | ||
"dockerComposeFile": "../docker-compose.yaml", | ||
"service": "adguard", | ||
"workspaceFolder": "/adguard/${localWorkspaceFolderBasename}", | ||
"remoteUser": "node" | ||
} |
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,34 @@ | ||
FROM node:18 | ||
|
||
RUN apt-get update && apt-get install fish mc vim curl sudo tmux -y && \ | ||
echo "fish" >>~/.bashrc | ||
|
||
RUN echo 'root:123' | chpasswd | ||
RUN echo 'node:123' | chpasswd | ||
|
||
RUN sudo usermod -a -G sudo node | ||
|
||
USER node | ||
|
||
# customize tmux | ||
RUN cd && \ | ||
git clone https://github.com/gpakosz/.tmux.git && \ | ||
ln -s -f .tmux/.tmux.conf && \ | ||
cp .tmux/.tmux.conf.local . | ||
|
||
# upd configs for cli tools | ||
RUN echo "fish" >>~/.bashrc | ||
RUN mkdir -p ~/.config/fish | ||
RUN echo "alias tmux='tmux -2'" >>~/.config/fish/config.fish | ||
RUN echo "set -U fish_prompt_pwd_dir_length 0" >>~/.config/fish/config.fish | ||
|
||
# install lazygit | ||
RUN wget https://github.com/jesseduffield/lazygit/releases/download/v$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')/lazygit_$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')_Linux_32-bit.tar.gz -P ~/.lazygit/ | ||
RUN tar -xf ~/.lazygit/lazygit_$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')_Linux_32-bit.tar.gz -C ~/.lazygit/ | ||
RUN echo "alias lazygit='~/.lazygit/lazygit'" >>~/.config/fish/config.fish | ||
RUN echo "alias lz='~/.lazygit/lazygit'" >>~/.config/fish/config.fish | ||
RUN git config --global core.autocrlf true | ||
RUN git config --global --add safe.directory '*' | ||
|
||
WORKDIR /app | ||
|
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,17 @@ | ||
version: "3.1" | ||
|
||
services: | ||
adguard: | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
container_name: adguard | ||
build: | ||
context: ./ | ||
dockerfile: ./Dockerfile | ||
volumes: | ||
- ..:/adguard:cached | ||
tty: true | ||
stdin_open: true | ||
restart: on-failure | ||
command: sleep infinity | ||
|