Initial commit
This commit is contained in:
275
Dockerfile
Normal file
275
Dockerfile
Normal file
@@ -0,0 +1,275 @@
|
||||
## The MIT License (MIT)
|
||||
##
|
||||
## Copyright © 2026 Scott E. Graves <scott.e.graves@protonmail.com>
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
## and associated documentation files (the “Software”), to deal in the Software without restriction,
|
||||
## including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
## sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
## furnished to do so, subject to the following conditions:
|
||||
##
|
||||
## The above copyright notice and this permission notice shall be included in all copies or
|
||||
## substantial portions of the Software.
|
||||
##
|
||||
## THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
## BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
## NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
## DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##
|
||||
FROM ubuntu:noble
|
||||
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
|
||||
|
||||
USER root
|
||||
|
||||
ARG NVIM_ARCH
|
||||
ARG NVIM_ARCH2
|
||||
ARG NVIM_OS
|
||||
ARG NV_DARCULA_ENABLE_COC
|
||||
|
||||
ENV \
|
||||
GID="1000" \
|
||||
GNAME="neovim" \
|
||||
LANG=en_US.utf8 \
|
||||
NVIM_APPNAME=nvim \
|
||||
NV_DARCULA_APPS="/home/neovim/.local/share/nvim/" \
|
||||
NV_DARCULA_ENABLE_COC=${NV_DARCULA_ENABLE_COC} \
|
||||
PATH="/nvim-${NVIM_OS}-${NVIM_ARCH}/bin:/python/bin:/home/neovim/go/bin:/home/neovim/.local/bin:/home/neovim/flutter/bin:/home/neovim/.pub-cache/bin:/usr/bin/core_perl:${PATH}" \
|
||||
PYTHONPATH="/python" \
|
||||
SHELL="/bin/bash" \
|
||||
TMPDIR=/tmp \
|
||||
UID="1000" \
|
||||
UNAME="neovim"
|
||||
|
||||
RUN \
|
||||
apt-get update -y && apt-get upgrade -y && \
|
||||
apt-get install -y curl locales software-properties-common && \
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
||||
install -m 0755 -d /etc/apt/keyrings && \
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
||||
chmod a+r /etc/apt/keyrings/docker.gpg && \
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||
add-apt-repository ppa:unit193/encryption -y && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y \
|
||||
android-sdk \
|
||||
android-sdk-build-tools \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
bzip2 \
|
||||
clang \
|
||||
cmake \
|
||||
codespell \
|
||||
containerd.io \
|
||||
cppcheck \
|
||||
curl \
|
||||
diffutils \
|
||||
docker-buildx-plugin \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
docker-compose-plugin \
|
||||
findutils \
|
||||
fuse3 \
|
||||
fzf \
|
||||
gcc \
|
||||
git \
|
||||
gnupg \
|
||||
golang \
|
||||
grep \
|
||||
gzip \
|
||||
jq \
|
||||
less \
|
||||
libtool \
|
||||
llvm \
|
||||
m4 \
|
||||
make \
|
||||
nano \
|
||||
ninja-build \
|
||||
nodejs \
|
||||
openjdk-21-jdk \
|
||||
openssh-client \
|
||||
openssh-server \
|
||||
patch \
|
||||
perl \
|
||||
pkgconf \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
ripgrep \
|
||||
rsync \
|
||||
shellcheck \
|
||||
sed \
|
||||
tar \
|
||||
tidy \
|
||||
unrar \
|
||||
unzip \
|
||||
valac \
|
||||
valgrind \
|
||||
veracrypt \
|
||||
vlc \
|
||||
wget \
|
||||
wmdocker \
|
||||
zip && \
|
||||
apt clean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
deluser ubuntu && \
|
||||
rm -rf /home/ubuntu && \
|
||||
groupadd -g ${GID} "${GNAME}" && \
|
||||
useradd -m -u ${UID} -g ${GNAME} -s ${SHELL} ${UNAME} && \
|
||||
echo "${UNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||
groupmod -g 962 docker && \
|
||||
groupmod -a -U ${UNAME} docker
|
||||
|
||||
COPY \
|
||||
entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN \
|
||||
chmod +x /entrypoint.sh && \
|
||||
chown ${UNAME}:${GNAME} /entrypoint.sh
|
||||
|
||||
RUN \
|
||||
git clone https://github.com/LuaLS/lua-language-server && \
|
||||
cd lua-language-server && \
|
||||
chmod +x ./make.sh && \
|
||||
./make.sh && \
|
||||
mv lua-language-server /usr/bin && \
|
||||
chmod +x /usr/bin/lua-language-server && \
|
||||
cd - && \
|
||||
rm -rf lua-language-server
|
||||
|
||||
RUN \
|
||||
npm i -g cspell && \
|
||||
npm i -g eslint && \
|
||||
npm i -g js-beautify && \
|
||||
npm i -g lua-fmt && \
|
||||
npm i -g neovim && \
|
||||
npm i -g npm && \
|
||||
npm i -g prettier && \
|
||||
npm i -g tree-sitter-cli
|
||||
|
||||
RUN \
|
||||
python3 -m venv /python && \
|
||||
pip3 install -U pip && \
|
||||
pip3 install -U cmake-language-server && \
|
||||
pip3 install -U coverage && \
|
||||
pip3 install -U cpplint && \
|
||||
pip3 install -U jedi && \
|
||||
pip3 install -U jedi-language-server && \
|
||||
pip3 install -U neovim && \
|
||||
pip3 install -U pylint && \
|
||||
CFLAGS=-Wno-incompatible-pointer-types pip3 install -U cppman
|
||||
|
||||
COPY \
|
||||
nvim/ /root/.config/nvim/
|
||||
|
||||
COPY \
|
||||
dap/ /root/.config/nvim/dap/
|
||||
|
||||
COPY \
|
||||
pkg/ /root/.config/nvim/pkg/
|
||||
|
||||
RUN \
|
||||
tar xvzf /root/.config/nvim/pkg/nvim-${NVIM_OS}-${NVIM_ARCH}.tar.gz -C /
|
||||
|
||||
RUN \
|
||||
mkdir -p "${NV_DARCULA_APPS}/dap/cpp" && \
|
||||
unzip /root/.config/nvim/dap/cpptools-${NVIM_OS}-${NVIM_ARCH2}.vsix -d "${NV_DARCULA_APPS}/dap/cpp" && \
|
||||
chmod +x "${NV_DARCULA_APPS}/dap/cpp/extension/debugAdapters/bin/OpenDebugAD7" && \
|
||||
cd "${NV_DARCULA_APPS}" && \
|
||||
git clone https://github.com/Dart-Code/Dart-Code.git && \
|
||||
cd "${NV_DARCULA_APPS}/Dart-Code" && \
|
||||
npm i && \
|
||||
npx webpack --mode production
|
||||
|
||||
RUN \
|
||||
nvim --headless "+qall"
|
||||
|
||||
RUN \
|
||||
if [ "$NV_DARCULA_ENABLE_COC" = "true" ]; then \
|
||||
nvim --headless "+CocInstall -sync coc-calc" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-clang-format-style-options" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-clangd" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-cmake" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-css" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-eslint" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-flutter" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-go" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-highlight" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-html" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-java" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-jedi" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-jest" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-json" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-lightbulb" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-markdownlint" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-omnisharp" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-powershell" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-react-refactor" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-sh" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-snippets" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-spell-checker" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-sumneko-lua" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-tsserver" "+qall" && \
|
||||
nvim --headless "+CocInstall -sync coc-vimlsp" "+qall" && \
|
||||
nvim --headless init.lua +CocStart \
|
||||
"+lua vim.defer_fn(function() vim.cmd('CocCommand sumneko-lua.install') end, 5000)" \
|
||||
"+lua vim.defer_fn(function() vim.cmd('qall') end, 15000)" && \
|
||||
nvim --headless init.lua +CocStart \
|
||||
"+lua vim.defer_fn(function() vim.cmd('CocCommand sumneko-lua.downloadNvimLuaTypes') end, 5000)" \
|
||||
"+lua vim.defer_fn(function() vim.cmd('qall') end, 15000)"; \
|
||||
fi
|
||||
|
||||
RUN \
|
||||
nvim --headless "+TSUpdate" \
|
||||
"+lua vim.defer_fn(function() vim.cmd('qall') end, 60000)"
|
||||
|
||||
RUN \
|
||||
rsync -av --progress --delete /root/.config/ /home/${UNAME}/.config/ && \
|
||||
rsync -av --progress --delete /root/.local/ /home/${UNAME}/.local/
|
||||
|
||||
RUN \
|
||||
chown -R ${UNAME}:${GNAME} /home/${UNAME}
|
||||
|
||||
USER ${UNAME}
|
||||
|
||||
ENV \
|
||||
GID="1000" \
|
||||
GNAME="neovim" \
|
||||
LANG=en_US.utf8 \
|
||||
NVIM_APPNAME=nvim \
|
||||
NV_DARCULA_APPS="/home/neovim/.local/share/nvim/" \
|
||||
NV_DARCULA_ENABLE_COC=${NV_DARCULA_ENABLE_COC} \
|
||||
PATH="/nvim-${NVIM_OS}-${NVIM_ARCH}/bin:/python/bin:/home/neovim/go/bin:/home/neovim/.local/bin:/home/neovim/flutter/bin:/home/neovim/.pub-cache/bin:/usr/bin/core_perl:${PATH}" \
|
||||
PYTHONPATH="/python" \
|
||||
SHELL="/bin/bash" \
|
||||
TMPDIR=/tmp \
|
||||
UID="1000" \
|
||||
UNAME="neovim"
|
||||
|
||||
RUN \
|
||||
cd "/home/${UNAME}" && \
|
||||
git clone https://github.com/flutter/flutter.git -b stable flutter && \
|
||||
cd - && \
|
||||
flutter && \
|
||||
flutter doctor && \
|
||||
flutter pub global activate dart_style
|
||||
|
||||
RUN \
|
||||
if [ "$NV_DARCULA_ENABLE_COC" = "false" ]; then \
|
||||
nvim --headless "+MasonToolsInstallSync" "+qall" && \
|
||||
nvim --headless "+LspInstall bashls" "+qall" && \
|
||||
nvim --headless "+LspInstall clangd" "+qall" && \
|
||||
nvim --headless "+LspInstall cspell_ls" "+qall" && \
|
||||
nvim --headless "+LspInstall gopls" "+qall" && \
|
||||
nvim --headless "+LspInstall lua_ls" "+qall" && \
|
||||
nvim --headless "+LspInstall vimls" "+qall"; \
|
||||
fi
|
||||
|
||||
RUN \
|
||||
go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# vim:filetype=dockerfile
|
||||
Reference in New Issue
Block a user