FROM quay.io/toolbx-images/alpine-toolbox:edge

# Update system and install packages
RUN apk update && apk upgrade && \
  apk add --no-cache \
  neovim \
  git \
  lazygit \
  zsh \
  curl \
  wget \
  ripgrep \
  fd \
  fzf \
  alpine-sdk \
  build-base \
  python3 \
  py3-pip \
  openssh

# Set environment variables
ENV EDITOR=nvim \
  VISUAL=nvim \
  TERM=xterm-256color \
  LANG=en_US.UTF-8 \
  LC_ALL=en_US.UTF-8 \
  SHELL=/bin/zsh

# Install and initialize chezmoi
RUN sh -c "$(curl -fsLS get.chezmoi.io)" -- -b /usr/local/bin && \
  mkdir -p ~/.local/share/chezmoi

RUN chsh -s /bin/zsh

RUN mkdir -p /workspace

WORKDIR /workspace

# Build commands:
# Docker: docker build -t dev-env .
# Podman: podman build -t dev-env .
