make docker framework more generalizable
This commit is contained in:
parent
6a4bcef0ba
commit
198d2afd52
2 changed files with 26 additions and 7 deletions
|
@ -1,8 +1,14 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
FROM debian:bookworm-20220822-slim
|
||||
|
||||
ENV TERM='xterm-256color' \
|
||||
HOME='/root'
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
ARG USER=daylin
|
||||
|
||||
RUN groupadd -g "${GID}" "${USER}" \
|
||||
&& useradd -rm -s /usr/bin/zsh -u "${UID}" -g "${GID}" "${USER}"
|
||||
|
||||
ENV TERM='xterm-256color'
|
||||
|
||||
COPY ./docker/install-packages.sh /usr/bin/install-packages
|
||||
|
||||
|
@ -24,7 +30,9 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|||
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
USER "${USER}"
|
||||
WORKDIR /home/"${USER}"
|
||||
|
||||
RUN sh -c "$(curl -fsLS https://chezmoi.io/get)"
|
||||
|
||||
|
@ -39,10 +47,18 @@ RUN ./bin/chezmoi init \
|
|||
ENV DOTFILES_DIR="$HOME/.dotfiles" \
|
||||
PATH="$PATH:$HOME/bin:$HOME/.dotfiles/bin"
|
||||
|
||||
# switch back to root for the secrets
|
||||
USER root
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN \
|
||||
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \
|
||||
$HOME/.dotfiles/docker/install-tools.sh
|
||||
/home/daylin/.dotfiles/docker/install-tools.sh
|
||||
USER daylin
|
||||
|
||||
ENV DOTFILES_DIR="/home/daylin/.dotfiles" \
|
||||
PATH="$PATH:/home/daylin/bin:/home/daylin/.dotfiles/bin"
|
||||
|
||||
# RUN tree
|
||||
RUN echo "$PATH"
|
||||
# get shell extensions
|
||||
RUN sheldon -q --config-file ~/.config/sheldon/plugins.toml lock
|
||||
|
||||
|
|
|
@ -3,17 +3,20 @@
|
|||
# eget() {
|
||||
# "$HOME/bin/eget" "$@"
|
||||
# }
|
||||
export EGET_BIN=$HOME/bin
|
||||
#
|
||||
export PATH="$PATH:/home/daylin/bin:/home/daylin/.dotfiles/bin"
|
||||
export EGET_BIN=/home/$USER/bin
|
||||
export DOTFILES_DIR=/home/$USER/.dotfiles
|
||||
|
||||
curl https://zyedidia.github.io/eget.sh | sh && mv ./eget ./bin/eget
|
||||
|
||||
tools $(cat "$HOME/.dotfiles/docker/tools.txt")
|
||||
tools $(cat "$DOTFILES_DIR/docker/tools.txt")
|
||||
|
||||
# eget rossmacarthur/sheldon
|
||||
eget tree-sitter/tree-sitter
|
||||
|
||||
# installing nvim
|
||||
eget neovim/neovim --to ./nvim.appimage
|
||||
eget neovim/neovim --to ./nvim.appimage --pre-release
|
||||
./nvim.appimage --appimage-extract
|
||||
./squashfs-root/AppRun --version
|
||||
|
||||
|
|
Loading…
Reference in a new issue