2021-12-17 04:50:37 +00:00
|
|
|
FROM alpine:3.15
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
RUN apk add \
|
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 \
|
2021-06-09 17:23:48 +00:00
|
|
|
make \
|
|
|
|
neovim \
|
|
|
|
npm \
|
2021-12-17 04:50:37 +00:00
|
|
|
py3-pip \
|
|
|
|
python3 \
|
|
|
|
rustup \
|
|
|
|
shellcheck \
|
|
|
|
;
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Install dependencies for python-language-server
|
|
|
|
RUN apk add gcc g++ python3-dev
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Install neovim python client
|
|
|
|
RUN pip3 install pynvim
|
2021-06-09 17:23:48 +00:00
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Create user
|
|
|
|
RUN adduser -D -h /home/vividboarder -s /bin/bash vividboarder
|
2021-06-09 17:23:48 +00:00
|
|
|
USER vividboarder
|
2021-12-17 04:50:37 +00:00
|
|
|
|
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
|
|
|
# Create persistent data dir
|
|
|
|
RUN mkdir -p /home/vividboarder/.data
|
|
|
|
VOLUME /home/vividboarder/.data
|
2021-06-09 17:23:48 +00:00
|
|
|
|
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
|
|
|
|
|
2021-12-17 04:50:37 +00:00
|
|
|
# Install Language servers
|
|
|
|
COPY --chown=vividboarder:vividboarder ./install-language-servers.sh ./
|
|
|
|
RUN ./install-language-servers.sh
|
|
|
|
# Install golangci-lint
|
|
|
|
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.43.0
|
|
|
|
|
|
|
|
# Add config
|
|
|
|
COPY --chown=vividboarder:vividboarder ./neovim $HOME/.config/nvim
|
|
|
|
|
|
|
|
# Sync packer plugins
|
|
|
|
RUN nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerBootstrap"
|
|
|
|
# This may not actually do anyting. Haven't figured out how to get compiled ts files into the image
|
|
|
|
RUN nvim --headless -c "TSUpdateSync" -c "quitall"
|
|
|
|
|
|
|
|
# Generate workdir
|
|
|
|
RUN mkdir /home/vividboarder/data
|
|
|
|
WORKDIR /home/vividboarder/data
|
|
|
|
|
|
|
|
COPY docker-entry.sh /docker-entry.sh
|
|
|
|
ENTRYPOINT /docker-entry.sh
|