# HG changeset patch # User zegervdv # Date 1638521060 -3600 # Node ID 3c1aaccf3ceff4fd81eac76815ecf69cba1fbd85 # Parent 16cc2c9c3d6b74519d106682d7590efc91580852 Add dockerfile to build a standalone container diff -r 16cc2c9c3d6b -r 3c1aaccf3cef .chezmoiignore --- a/.chezmoiignore Wed Dec 01 18:43:31 2021 +0100 +++ b/.chezmoiignore Fri Dec 03 09:44:20 2021 +0100 @@ -6,6 +6,7 @@ scripts .pre-commit-config.yaml *~ +Dockerfile {{ if ne .chezmoi.os "windows" }} AppData/* diff -r 16cc2c9c3d6b -r 3c1aaccf3cef Dockerfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile Fri Dec 03 09:44:20 2021 +0100 @@ -0,0 +1,52 @@ +FROM ubuntu:20.04 as builder + +ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Brussels" + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y git \ + wget \ + build-essential \ + ninja-build \ + gettext \ + libtool \ + libtool-bin \ + autoconf \ + automake \ + cmake \ + g++ \ + pkg-config \ + unzip \ + curl \ + doxygen + +WORKDIR /build + +RUN git clone https://github.com/neovim/neovim.git \ + && cd neovim \ + && make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=/apps/nvim \ + && make install + + +FROM ubuntu:20.04 + +RUN apt update \ + && apt install -y unzip curl git + +WORKDIR /config +RUN echo '[data]\n\ + email="none"\n\ + name="none"\n\ + signingkey="none"\n\ + font_size="11.0"' > /config/chezmoi.toml +RUN sh -c "$(curl -fsLS git.io/chezmoi)" -- init --config "/config/chezmoi.toml" --one-shot zegervdv + +COPY scripts/install.sh /install.sh +RUN sh /install.sh + +COPY --from=builder /apps /apps + +RUN /apps/nvim/bin/nvim --headless +qall +RUN /apps/nvim/bin/nvim --headless --noplugin +'lua vim.defer_fn(function () vim.cmd [[PackerSync]] end, 0)' +'autocmd User PackerComplete qall' + +ENTRYPOINT ["/apps/nvim/bin/nvim"]