Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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}/.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. eza \
  20. mcfly \
  21. upx \
  22. starship \
  23. fd \
  24. bat \
  25. yq \
  26. jq \
  27. # Dev
  28. vim \
  29. neovim \
  30. lazygit \
  31. npm \
  32. python3 \
  33. && apk cache clean
  34. # Copy dotfiles config
  35. COPY ../dotfiles "$DOTFILES_ROOT/dotfiles/"
  36. # Setup docker user
  37. RUN addgroup "$DOCKER_USER" --gid "$DOCKER_GID" \
  38. && adduser "$DOCKER_USER" -G "$DOCKER_USER" --uid "$DOCKER_UID" --disabled-password \
  39. && $DOTFILES_ROOT/dotfiles/.config/scripts/sedchad "palette = 'default'" "palette = 'nord-tan'" $DOTFILES_ROOT/dotfiles/.config/starship.toml \
  40. && mkdir -p /home/$DOCKER_USER/.config \
  41. && mkdir -p /home/$DOCKER_USER/.local/share/fish \
  42. && touch /home/$DOCKER_USER/.local/share/fish/fish_history \
  43. && chown -R "$DOCKER_USER" /home/$DOCKER_USER
  44. WORKDIR /home/$DOCKER_USER
  45. USER $DOCKER_USER
  46. RUN force=1 $DOTFILES_ROOT/dotfiles/.config/scripts/dotinstall
  47. ENTRYPOINT [ "fish" ]