summaryrefslogtreecommitdiff
path: root/utils/docker
diff options
context:
space:
mode:
authorSubho Banerjee <[email protected]>2021-09-23 07:08:31 -0500
committerGitHub <[email protected]>2021-09-23 15:38:31 +0330
commit6214ff9ef6a6171bd9746e64249c9e75da17b317 (patch)
tree860a18cfbb9aebc543809b9417ec4bcf803f836b /utils/docker
parentedeadaf05d98034bc91a22ad50263a7a25c6020a (diff)
fix: Rework Dockerfile to run lvim (#1593)
Diffstat (limited to 'utils/docker')
-rw-r--r--utils/docker/Dockerfile22
-rwxr-xr-xutils/docker/script.sh23
2 files changed, 18 insertions, 27 deletions
diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile
index 58760001..5a3b2f61 100644
--- a/utils/docker/Dockerfile
+++ b/utils/docker/Dockerfile
@@ -1,11 +1,25 @@
-FROM python:3
+FROM ubuntu:latest
-SHELL ["/bin/bash", "-c"]
+ARG NEOVIM_RELEASE=v0.5.0
+ARG LVBRANCH=rolling
ENV DEBIAN_FRONTEND=noninteractive
-COPY script.sh /tmp/script.sh
+# Install apt dependencies
+RUN apt update && \
+ apt -y install sudo curl build-essential git fzf python3-dev python3-pip cargo && \
+ curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
+ apt update && \
+ apt -y install nodejs && \
+ curl -L -o /tmp/nvim.appimage https://github.com/neovim/neovim/releases/download/${NEOVIM_RELEASE}/nvim.appimage && \
+ chmod u+x /tmp/nvim.appimage && \
+ /tmp/nvim.appimage --appimage-extract && \
+ mv squashfs-root /usr/local/neovim && \
+ ln -s /usr/local/neovim/usr/bin/nvim /usr/bin/nvim && \
+ apt clean && rm -rf /var/lib/apt/lists/* /tmp/* && \
+ LVBRANCH=${LVBRANCH} curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/rolling/utils/installer/install.sh | bash -s -- -y
-RUN bash -c "/tmp/script.sh"
+ENV PATH="/root/.local/bin:/root/.cargo/bin:/root/.npm-global/bin${PATH}"
ENTRYPOINT ["/bin/bash"]
+CMD ["lvim"]
diff --git a/utils/docker/script.sh b/utils/docker/script.sh
deleted file mode 100755
index 35257147..00000000
--- a/utils/docker/script.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-# Updating the package list
-apt-get update
-
-# Installing dependencies
-apt-get -y install tzdata sudo git nodejs npm git ripgrep fzf ranger curl fonts-hack-ttf
-
-pip3 install ueberzug neovim-remote
-npm install tree-sitter-cli neovim
-
-# Installing Neovim
-mkdir -p /tmp/neovim
-cd /tmp/neovim || exit
-curl -L -o nvim.appimage https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
-chmod u+x nvim.appimage
-./nvim.appimage --appimage-extract
-mv squashfs-root /usr/local/neovim
-ln -s /usr/local/neovim/usr/bin/nvim /usr/bin/nvim
-rm ./nvim.appimage
-
-# Installing LunarVim
-LVBRANCH=master bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/rolling/utils/installer/install.sh)