major docker updates
This commit is contained in:
parent
ca6ed0952f
commit
16999e844b
7 changed files with 75 additions and 19 deletions
5
Makefile
5
Makefile
|
@ -25,7 +25,10 @@ completions:
|
|||
.PHONY: db d-build
|
||||
db d-build:
|
||||
$(call msg,Building Docker Image)
|
||||
@docker build -f docker/Dockerfile -t dots .
|
||||
@DOCKER_BUILDKIT=1 docker build \
|
||||
--secret id=GITHUB_TOKEN \
|
||||
-f docker/Dockerfile \
|
||||
-t dots .
|
||||
|
||||
## dr, d-run | run docker image
|
||||
.PHONY: dr d-run
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
FROM debian:bookworm-20220822-slim
|
||||
|
||||
ENV TERM='xterm-256color' \
|
||||
HOME='/root'
|
||||
|
||||
COPY ./docker/install_packages.sh /usr/bin/install_packages
|
||||
COPY ./docker/install-packages.sh /usr/bin/install-packages
|
||||
|
||||
RUN install_packages \
|
||||
RUN install-packages \
|
||||
ca-certificates \
|
||||
locales \
|
||||
gcc \
|
||||
tmux \
|
||||
curl \
|
||||
gawk \
|
||||
zsh \
|
||||
vim \
|
||||
git \
|
||||
neovim
|
||||
python-is-python3 \
|
||||
python3
|
||||
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
locale-gen
|
||||
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
|
||||
WORKDIR /root
|
||||
|
@ -25,18 +29,27 @@ WORKDIR /root
|
|||
RUN sh -c "$(curl -fsLS https://chezmoi.io/get)"
|
||||
|
||||
COPY . .dotfiles
|
||||
RUN ./bin/chezmoi init --apply -S ~/.dotfiles
|
||||
|
||||
RUN ./bin/chezmoi init \
|
||||
--apply \
|
||||
-S ~/.dotfiles \
|
||||
--promptString 'git email=daylinmorgan@gmail.com,git name=Daylin Morgan' \
|
||||
--promptBool 'use gui configs=false'
|
||||
|
||||
ENV DOTFILES_DIR="$HOME/.dotfiles" \
|
||||
PATH="$PATH:$HOME/bin:$HOME/.dotfiles/bin"
|
||||
|
||||
# setup eget for tools script
|
||||
RUN curl https://zyedidia.github.io/eget.sh | sh && mv ./eget ./bin/eget
|
||||
|
||||
# use eget to fetch yq and some needed tools
|
||||
RUN tools $(cat .dotfiles/docker/tools.txt)
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN \
|
||||
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \
|
||||
$HOME/.dotfiles/docker/install-tools.sh
|
||||
|
||||
# get shell extensions
|
||||
RUN sheldon -q --config-file ~/.config/sheldon/plugins.toml lock
|
||||
|
||||
# install general tools used by neovim
|
||||
RUN ~/.dotfiles/docker/install-dev-envs.sh
|
||||
|
||||
# install astronvim
|
||||
RUN ~/.config/astronvim/install.sh
|
||||
|
||||
CMD ["zsh"]
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# TODO
|
||||
|
||||
- [ ] lunarvim
|
||||
- [ ] install node
|
||||
- [ ] install rustup/cargo
|
||||
- [ ] run packer install command
|
20
docker/install-dev-envs.sh
Executable file
20
docker/install-dev-envs.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
|
||||
is-executable() {
|
||||
[ -x "$(command -v "$1")" ]
|
||||
}
|
||||
|
||||
install-cargo-rustup() {
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
|
||||
}
|
||||
|
||||
install-npm() {
|
||||
fnm install 'v18.5.0'
|
||||
}
|
||||
|
||||
install-cargo-rustup
|
||||
|
||||
if is-executable fnm; then
|
||||
install-npm
|
||||
fi
|
22
docker/install-tools.sh
Executable file
22
docker/install-tools.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# eget() {
|
||||
# "$HOME/bin/eget" "$@"
|
||||
# }
|
||||
export EGET_BIN=$HOME/bin
|
||||
|
||||
curl https://zyedidia.github.io/eget.sh | sh && mv ./eget ./bin/eget
|
||||
|
||||
tools $(cat "$HOME/.dotfiles/docker/tools.txt")
|
||||
|
||||
# eget rossmacarthur/sheldon
|
||||
eget tree-sitter/tree-sitter
|
||||
|
||||
# installing nvim
|
||||
eget neovim/neovim --to ./nvim.appimage
|
||||
./nvim.appimage --appimage-extract
|
||||
./squashfs-root/AppRun --version
|
||||
|
||||
mv squashfs-root /
|
||||
ln -s /squashfs-root/AppRun /usr/bin/nvim
|
||||
rm nvim.appimage
|
|
@ -1,4 +1,8 @@
|
|||
atuin
|
||||
fnm
|
||||
fzf
|
||||
lazygit
|
||||
lsd
|
||||
ripgrep
|
||||
starship
|
||||
sheldon
|
||||
ripgrep
|
||||
lsd
|
||||
|
|
Loading…
Reference in a new issue