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
|
FROM quay.io/toolbx-images/alpine-toolbox:edge
|
||||||
|
|
||||||
# Update system and install packages
|
# Setup alpine packages
|
||||||
RUN apk update && apk upgrade && \
|
RUN --mount=type=cache,target=/var/cache/apk/ \
|
||||||
apk add --no-cache \
|
apk update && apk upgrade && apk add \
|
||||||
neovim \
|
build-base \
|
||||||
git \
|
|
||||||
lazygit \
|
|
||||||
zsh \
|
|
||||||
curl \
|
curl \
|
||||||
wget \
|
|
||||||
ripgrep \
|
|
||||||
fd \
|
fd \
|
||||||
fzf \
|
fzf \
|
||||||
alpine-sdk \
|
git \
|
||||||
build-base \
|
lazygit \
|
||||||
python3 \
|
neovim \
|
||||||
py3-pip \
|
nushell \
|
||||||
yazi \
|
openssh \
|
||||||
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
|
# Set environment variables
|
||||||
ENV EDITOR=nvim \
|
ENV EDITOR=nvim \
|
||||||
|
|
@ -27,16 +43,11 @@ ENV EDITOR=nvim \
|
||||||
LC_ALL=en_US.UTF-8 \
|
LC_ALL=en_US.UTF-8 \
|
||||||
SHELL=/bin/zsh
|
SHELL=/bin/zsh
|
||||||
|
|
||||||
# Install and initialize chezmoi
|
# Basic setup
|
||||||
RUN sh -c "$(curl -fsLS get.chezmoi.io)" -- -b /usr/local/bin && \
|
RUN \
|
||||||
mkdir -p ~/.local/share/chezmoi
|
# chsh -s /usr/bin/nu ## TODO: first create a configuration for nu
|
||||||
|
chsh -s /bin/zsh
|
||||||
RUN chsh -s /bin/zsh
|
|
||||||
|
|
||||||
RUN mkdir -p /workspace
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
|
|
||||||
# Build commands:
|
# Build commands:
|
||||||
# Docker: docker build -t dev-env .
|
# Docker: docker build -t devbox .
|
||||||
# Podman: podman build -t dev-env .
|
# Podman: podman build -t devbox .
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue