From 6214ff9ef6a6171bd9746e64249c9e75da17b317 Mon Sep 17 00:00:00 2001 From: Subho Banerjee Date: Thu, 23 Sep 2021 07:08:31 -0500 Subject: fix: Rework Dockerfile to run lvim (#1593) --- utils/docker/Dockerfile | 22 ++++++++++++++++++---- utils/docker/script.sh | 23 ----------------------- 2 files changed, 18 insertions(+), 27 deletions(-) delete mode 100755 utils/docker/script.sh (limited to 'utils/docker') 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) -- cgit v1.2.3 From e270bdbd6f9adfd9ae471512c63c3283798481f1 Mon Sep 17 00:00:00 2001 From: Subho Banerjee Date: Thu, 30 Sep 2021 11:53:14 -0500 Subject: [Bugfix]: Use local install in Github actions (#1628) Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- utils/docker/Dockerfile | 25 ------------------------- utils/docker/Dockerfile.local | 27 +++++++++++++++++++++++++++ utils/docker/Dockerfile.remote | 27 +++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 25 deletions(-) delete mode 100644 utils/docker/Dockerfile create mode 100644 utils/docker/Dockerfile.local create mode 100644 utils/docker/Dockerfile.remote (limited to 'utils/docker') diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile deleted file mode 100644 index 5a3b2f61..00000000 --- a/utils/docker/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM ubuntu:latest - -ARG NEOVIM_RELEASE=v0.5.0 -ARG LVBRANCH=rolling - -ENV DEBIAN_FRONTEND=noninteractive - -# 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 - -ENV PATH="/root/.local/bin:/root/.cargo/bin:/root/.npm-global/bin${PATH}" - -ENTRYPOINT ["/bin/bash"] -CMD ["lvim"] diff --git a/utils/docker/Dockerfile.local b/utils/docker/Dockerfile.local new file mode 100644 index 00000000..c219e34f --- /dev/null +++ b/utils/docker/Dockerfile.local @@ -0,0 +1,27 @@ +# To run this file execute: +# docker build -f -t Lunarvim:local + +FROM ubuntu:latest + +# Set environment correctly +ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="/root/.local/bin:/root/.cargo/bin:/root/.npm-global/bin${PATH}" + +# Copy in local directory +COPY --chown=root:root . /LunarVim + +# Install dependencies and LunarVim +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 && \ + apt clean && rm -rf /var/lib/apt/lists/* /tmp/* && \ + /LunarVim/utils/installer/install-neovim-from-release && \ + /LunarVim/utils/installer/install.sh --local --no-install-dependencies + +# Setup LVIM to run on starup +ENTRYPOINT ["/bin/bash"] +CMD ["lvim"] + +# vim: ft=dockerfile: diff --git a/utils/docker/Dockerfile.remote b/utils/docker/Dockerfile.remote new file mode 100644 index 00000000..94765c48 --- /dev/null +++ b/utils/docker/Dockerfile.remote @@ -0,0 +1,27 @@ +# To run this file execute: +# docker build -f Dockerfile.remote . -t Lunarvim:remote + +FROM ubuntu:latest + +# Build argument to point to correct branch on GitHub +ARG LV_BRANCH=rolling + +# Set environment correctly +ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="/root/.local/bin:/root/.cargo/bin:/root/.npm-global/bin${PATH}" + +# Install dependencies and LunarVim +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 && \ + apt clean && rm -rf /var/lib/apt/lists/* /tmp/* && \ + curl -LSs https://raw.githubusercontent.com/lunarvim/lunarvim/${LV_BRANCH}/utils/installer/install-neovim-from-release | bash && \ + LV_BRANCH=${LV_BRANCH} curl -LSs https://raw.githubusercontent.com/lunarvim/lunarvim/${LV_BRANCH}/utils/installer/install.sh | bash -s -- --no-install-dependencies + +# Setup LVIM to run on starup +ENTRYPOINT ["/bin/bash"] +CMD ["lvim"] + +# vim: ft=dockerfile: -- cgit v1.2.3