feat: add apk and cargo packages to devbox
This commit is contained in:
parent
48d623b989
commit
690d9d3f6b
1 changed files with 37 additions and 26 deletions
|
|
@ -1,23 +1,39 @@
|
|||
FROM rust:latest AS rust-builder
|
||||
|
||||
# setup cargo packages, prefer to use apk packages
|
||||
# to reduce build time and space
|
||||
RUN --mount=type=cache,target=/app/target/ \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry/ \
|
||||
cargo install --locked \
|
||||
cocogitto \
|
||||
yazi-fm yazi-cli \
|
||||
tealdeer
|
||||
|
||||
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 \
|
||||
# Setup alpine packages
|
||||
RUN --mount=type=cache,target=/var/cache/apk/ \
|
||||
apk update && apk upgrade && apk add \
|
||||
build-base \
|
||||
curl \
|
||||
wget \
|
||||
ripgrep \
|
||||
fd \
|
||||
fzf \
|
||||
alpine-sdk \
|
||||
build-base \
|
||||
python3 \
|
||||
py3-pip \
|
||||
yazi \
|
||||
openssh
|
||||
git \
|
||||
lazygit \
|
||||
neovim \
|
||||
nushell \
|
||||
openssh \
|
||||
ripgrep \
|
||||
sd \
|
||||
starship \
|
||||
tmux \
|
||||
tree-sitter-cli \
|
||||
zoxide \
|
||||
zsh
|
||||
|
||||
# Import cargo packages
|
||||
COPY --from=rust-builder /usr/local/cargo/bin/* /usr/local/bin/
|
||||
|
||||
# Set environment variables
|
||||
ENV EDITOR=nvim \
|
||||
|
|
@ -27,16 +43,11 @@ ENV EDITOR=nvim \
|
|||
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
|
||||
# Basic setup
|
||||
RUN \
|
||||
# chsh -s /usr/bin/nu ## TODO: first create a configuration for nu
|
||||
chsh -s /bin/zsh
|
||||
|
||||
# Build commands:
|
||||
# Docker: docker build -t dev-env .
|
||||
# Podman: podman build -t dev-env .
|
||||
# Docker: docker build -t devbox .
|
||||
# Podman: podman build -t devbox .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue