comparison Dockerfile @ 493:3c1aaccf3cef

Add dockerfile to build a standalone container
author zegervdv <zegervdv@me.com>
date Fri, 03 Dec 2021 09:44:20 +0100
parents
children
comparison
equal deleted inserted replaced
492:16cc2c9c3d6b 493:3c1aaccf3cef
1 FROM ubuntu:20.04 as builder
2
3 ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Brussels"
4
5 RUN apt update -y \
6 && apt upgrade -y \
7 && apt install -y git \
8 wget \
9 build-essential \
10 ninja-build \
11 gettext \
12 libtool \
13 libtool-bin \
14 autoconf \
15 automake \
16 cmake \
17 g++ \
18 pkg-config \
19 unzip \
20 curl \
21 doxygen
22
23 WORKDIR /build
24
25 RUN git clone https://github.com/neovim/neovim.git \
26 && cd neovim \
27 && make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=/apps/nvim \
28 && make install
29
30
31 FROM ubuntu:20.04
32
33 RUN apt update \
34 && apt install -y unzip curl git
35
36 WORKDIR /config
37 RUN echo '[data]\n\
38 email="none"\n\
39 name="none"\n\
40 signingkey="none"\n\
41 font_size="11.0"' > /config/chezmoi.toml
42 RUN sh -c "$(curl -fsLS git.io/chezmoi)" -- init --config "/config/chezmoi.toml" --one-shot zegervdv
43
44 COPY scripts/install.sh /install.sh
45 RUN sh /install.sh
46
47 COPY --from=builder /apps /apps
48
49 RUN /apps/nvim/bin/nvim --headless +qall
50 RUN /apps/nvim/bin/nvim --headless --noplugin +'lua vim.defer_fn(function () vim.cmd [[PackerSync]] end, 0)' +'autocmd User PackerComplete qall'
51
52 ENTRYPOINT ["/apps/nvim/bin/nvim"]