2022-12-09 14:25:06 -06:00
|
|
|
# syntax = docker/dockerfile:1.3
|
2022-09-02 16:05:16 -05:00
|
|
|
FROM debian:bookworm-20220822-slim
|
|
|
|
|
2022-12-10 12:18:26 -06:00
|
|
|
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'
|
2022-09-02 16:05:16 -05:00
|
|
|
|
2022-12-09 14:25:06 -06:00
|
|
|
COPY ./docker/install-packages.sh /usr/bin/install-packages
|
2022-09-02 16:05:16 -05:00
|
|
|
|
2022-12-09 14:25:06 -06:00
|
|
|
RUN install-packages \
|
2022-09-02 16:05:16 -05:00
|
|
|
ca-certificates \
|
|
|
|
locales \
|
2022-12-09 14:25:06 -06:00
|
|
|
gcc \
|
2022-09-02 16:05:16 -05:00
|
|
|
tmux \
|
|
|
|
curl \
|
|
|
|
gawk \
|
|
|
|
zsh \
|
2022-12-09 14:25:06 -06:00
|
|
|
vim \
|
2022-09-02 16:05:16 -05:00
|
|
|
git \
|
2022-12-09 14:25:06 -06:00
|
|
|
python-is-python3 \
|
|
|
|
python3
|
2022-09-02 16:05:16 -05:00
|
|
|
|
|
|
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
|
|
locale-gen
|
2022-12-09 14:25:06 -06:00
|
|
|
|
2022-09-02 16:05:16 -05:00
|
|
|
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
|
|
|
|
2022-12-10 12:18:26 -06:00
|
|
|
|
|
|
|
USER "${USER}"
|
|
|
|
WORKDIR /home/"${USER}"
|
2022-09-02 16:05:16 -05:00
|
|
|
|
|
|
|
RUN sh -c "$(curl -fsLS https://chezmoi.io/get)"
|
|
|
|
|
|
|
|
COPY . .dotfiles
|
2022-12-09 14:25:06 -06:00
|
|
|
|
|
|
|
RUN ./bin/chezmoi init \
|
|
|
|
--apply \
|
|
|
|
-S ~/.dotfiles \
|
|
|
|
--promptString 'git email=daylinmorgan@gmail.com,git name=Daylin Morgan' \
|
|
|
|
--promptBool 'use gui configs=false'
|
2022-09-02 16:05:16 -05:00
|
|
|
|
|
|
|
ENV DOTFILES_DIR="$HOME/.dotfiles" \
|
|
|
|
PATH="$PATH:$HOME/bin:$HOME/.dotfiles/bin"
|
|
|
|
|
2022-12-10 12:18:26 -06:00
|
|
|
# switch back to root for the secrets
|
|
|
|
USER root
|
2022-12-09 14:25:06 -06:00
|
|
|
RUN --mount=type=secret,id=GITHUB_TOKEN \
|
|
|
|
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \
|
2022-12-10 12:18:26 -06:00
|
|
|
/home/daylin/.dotfiles/docker/install-tools.sh
|
|
|
|
USER daylin
|
|
|
|
|
|
|
|
ENV DOTFILES_DIR="/home/daylin/.dotfiles" \
|
|
|
|
PATH="$PATH:/home/daylin/bin:/home/daylin/.dotfiles/bin"
|
2022-09-02 16:05:16 -05:00
|
|
|
|
2022-12-10 12:18:26 -06:00
|
|
|
# RUN tree
|
|
|
|
RUN echo "$PATH"
|
2022-09-02 16:05:16 -05:00
|
|
|
# get shell extensions
|
|
|
|
RUN sheldon -q --config-file ~/.config/sheldon/plugins.toml lock
|
|
|
|
|
2022-12-09 14:25:06 -06:00
|
|
|
# install general tools used by neovim
|
|
|
|
RUN ~/.dotfiles/docker/install-dev-envs.sh
|
|
|
|
|
|
|
|
# install astronvim
|
|
|
|
RUN ~/.config/astronvim/install.sh
|
|
|
|
|
2022-09-02 16:05:16 -05:00
|
|
|
CMD ["zsh"]
|