Dockerfile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. FROM alpine:latest
  2. ARG DOCKER_USER=${DOCKER_USER:-mbrav}
  3. ARG DOCKER_UID=${DOCKER_UID:-1000}
  4. ARG DOCKER_GID=${DOCKER_GID:-1000}
  5. ARG DOTFILES_ROOT="/home/${DOCKER_USER:-mbrav}/.config/dotfiles/"
  6. # Install system packages
  7. RUN apk add --upgrade --latest \
  8. bash \
  9. fish \
  10. curl \
  11. musl \
  12. build-base \
  13. unzip \
  14. git \
  15. # CLI tools
  16. grep \
  17. ripgrep \
  18. fzf \
  19. fd \
  20. bat \
  21. yq \
  22. jq \
  23. # Dev
  24. vim \
  25. neovim \
  26. lazygit \
  27. npm \
  28. python3 \
  29. && apk cache clean
  30. # Copy dotfiles config
  31. COPY ../dotfiles "$DOTFILES_ROOT/dotfiles/"
  32. COPY ../install.sh "$DOTFILES_ROOT"
  33. # Setup docker user
  34. RUN addgroup "$DOCKER_USER" --gid "$DOCKER_GID" \
  35. && adduser "$DOCKER_USER" -G "$DOCKER_USER" --uid "$DOCKER_UID" --disabled-password \
  36. && $DOTFILES_ROOT/dotfiles/.config/scripts/binstall eza \
  37. && $DOTFILES_ROOT/dotfiles/.config/scripts/binstall mcfly \
  38. && $DOTFILES_ROOT/dotfiles/.config/scripts/binstall upx \
  39. && $DOTFILES_ROOT/dotfiles/.config/scripts/binstall starship \
  40. && $DOTFILES_ROOT/dotfiles/.config/scripts/sedchad "palette = 'default'" "palette = 'nord-tan'" $DOTFILES_ROOT/dotfiles/.config/starship.toml \
  41. && mkdir -p /home/$DOCKER_USER/.config \
  42. && chown -R "$DOCKER_USER" /home/$DOCKER_USER
  43. WORKDIR /home/$DOCKER_USER
  44. USER $DOCKER_USER
  45. RUN force=1 /home/$DOCKER_USER/.config/dotfiles/install.sh
  46. ENTRYPOINT [ "fish" ]