1
0
Fork 0
cozy-dev/Dockerfile

57 lines
1.3 KiB
Text
Raw Normal View History

2024-12-05 09:59:42 +01:00
FROM docker.io/alpine:edge
ENV OS_ENV=container
RUN --mount=target=/var/cache/apk,type=cache,sharing=locked \
apk update && \
apk upgrade && \
apk add fish \
bash \
shadow \
sudo \
starship \
starship-fish-completion \
git \
git-flow \
github-cli \
curl \
fzf \
ripgrep \
ripgrep-fish-completion \
tmux \
most \
neovim \
micro \
delta
RUN adduser -u1000 -D code code && \
chsh -s "$(which fish)" code && \
adduser code wheel && \
mkdir -p /workspace && \
chown -R code:code /workspace
COPY <<EOF /etc/sudoers.d/wheel
%wheel ALL=(ALL) NOPASSWD: ALL
EOF
COPY <<EOF /home/code/.config/starship.toml
[git_metrics]
added_style = 'bold blue'
format = '[+\$added](\$added_style)/[-\$deleted](\$deleted_style) '
disabled = false
EOF
COPY <<EOF /home/code/.config/fish/conf.d/starship.fish
source (starship init fish --print-full-init | psub)
EOF
RUN chown -R code:code /home/code
USER code
RUN fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher && \
fisher install fischerling/plugin-wd acomagu/fish-async-prompt jethrokuan/fzf"
WORKDIR /workspace
VOLUME [ "/workspace", "/home/code" ]