2023-06-27 23:24:39 +00:00
|
|
|
# hadolint global ignore=DL3018,DL3059
|
|
|
|
|
2024-07-17 16:41:46 +00:00
|
|
|
FROM alpine:3
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2022-08-31 20:56:46 +00:00
|
|
|
RUN apk add --no-cache \
|
2021-06-09 17:23:48 +00:00
|
|
|
bash \
|
2021-12-17 04:50:37 +00:00
|
|
|
cargo \
|
|
|
|
ctags \
|
2021-06-09 17:23:48 +00:00
|
|
|
curl \
|
|
|
|
git \
|
2021-12-17 04:50:37 +00:00
|
|
|
go \
|
2022-01-06 22:50:04 +00:00
|
|
|
luarocks \
|
2021-06-09 17:23:48 +00:00
|
|
|
make \
|
2023-05-23 00:13:54 +00:00
|
|
|
neovim \
|
2021-06-09 17:23:48 +00:00
|
|
|
npm \
|
2021-12-17 04:50:37 +00:00
|
|
|
py3-pip \
|
2023-05-23 00:13:54 +00:00
|
|
|
py3-pynvim \
|
2021-12-17 04:50:37 +00:00
|
|
|
python3 \
|
|
|
|
;
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2023-06-13 22:12:50 +00:00
|
|
|
# Install shellcheck and rustup, if in repo (like arm)
|
|
|
|
RUN apk add --no-cache shellcheck rustup || true
|
2021-12-17 05:05:42 +00:00
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Create user
|
2022-01-03 06:06:47 +00:00
|
|
|
RUN adduser -D -h /home/vividboarder -s /bin/bash --ingroup users vividboarder
|
2021-06-09 17:23:48 +00:00
|
|
|
USER vividboarder
|
2021-12-17 04:50:37 +00:00
|
|
|
|
2023-06-27 23:24:39 +00:00
|
|
|
# Create home and XDG paths
|
2021-06-09 17:23:48 +00:00
|
|
|
WORKDIR /home/vividboarder
|
|
|
|
ENV HOME /home/vividboarder
|
|
|
|
ENV XDG_CONFIG_HOME $HOME/.config
|
|
|
|
RUN mkdir -p $XDG_CONFIG_HOME
|
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Configure go path
|
|
|
|
ENV GOPATH $HOME/go
|
|
|
|
RUN mkdir -p $GOPATH/bin
|
|
|
|
ENV PATH $PATH:$GOPATH/bin
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Configure npm path
|
2021-06-09 17:23:48 +00:00
|
|
|
ENV NPM_PACKAGES $HOME/.npm-packages
|
|
|
|
RUN npm config set prefix $NPM_PACKAGES
|
2021-12-17 04:50:37 +00:00
|
|
|
ENV PATH $PATH:$NPM_PACKAGES/bin
|
2021-06-09 17:23:48 +00:00
|
|
|
ENV PATH $HOME/.local/bin:$PATH
|
|
|
|
|
2023-06-13 00:14:03 +00:00
|
|
|
# Add personal user bin path
|
|
|
|
RUN mkdir $HOME/bin
|
|
|
|
ENV PATH $HOME/bin:$PATH
|
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Install Language servers
|
2023-12-13 17:29:51 +00:00
|
|
|
COPY --chown=vividboarder:users ./install-coding-helpers.sh ./
|
|
|
|
RUN ./install-coding-helpers.sh
|
2021-12-17 04:50:37 +00:00
|
|
|
|
|
|
|
# Add config
|
2022-01-03 06:06:47 +00:00
|
|
|
COPY --chown=vividboarder:users ./neovim $HOME/.config/nvim
|
2021-12-17 04:50:37 +00:00
|
|
|
|
|
|
|
# Sync packer plugins
|
|
|
|
RUN nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerBootstrap"
|
2022-01-03 06:06:47 +00:00
|
|
|
# Bootstrap treesitter parsers
|
|
|
|
RUN nvim --headless -c "lua require('plugins.treesitter').bootstrap()" -c quitall
|
|
|
|
|
|
|
|
# Create persistent data dir
|
|
|
|
RUN mkdir -p /home/vividboarder/.data
|
2023-06-27 23:24:39 +00:00
|
|
|
VOLUME /home/vividboarder/.data
|
2021-12-17 04:50:37 +00:00
|
|
|
|
|
|
|
# Generate workdir
|
|
|
|
RUN mkdir /home/vividboarder/data
|
|
|
|
WORKDIR /home/vividboarder/data
|
|
|
|
|
2022-01-06 22:50:04 +00:00
|
|
|
COPY ./docker/docker-entry.sh /docker-entry.sh
|
2022-08-31 20:56:46 +00:00
|
|
|
ENTRYPOINT ["/docker-entry.sh"]
|