1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:00:04 +08:00

fix(docker): fix docker configuration

This commit is contained in:
wsdjeg 2022-05-23 21:32:03 +08:00
parent e80330c064
commit 41670eee28
5 changed files with 38 additions and 62 deletions

View File

@ -29,6 +29,6 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.nvim-python3
file: docker/Dockerfile
push: true
tags: spacevim/spacevim:latest

34
docker/Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM debian:jessie
MAINTAINER Shidong Wang <wsdjeg@outlook.com>
RUN apt-get update && \
apt-get install -y neovim curl git exuberant-ctags silversearcher-ag && \
apt-get clean
ENV HOME /home/spacevim
RUN groupdel users \
&& groupadd -r spacevim \
&& useradd --create-home --home-dir $HOME \
-r -g spacevim \
spacevim
USER spacevim
WORKDIR $HOME
ENV PATH "$HOME/.local/bin:${PATH}"
RUN mkdir -p $HOME/.config $HOME/.SpaceVim.d
RUN pip install --user neovim pipenv
RUN curl https://raw.githubusercontent.com/SpaceVim/SpaceVim/master/docker/init.toml > $HOME/.SpaceVim.d/init.toml
RUN curl -sLf https://spacevim.org/install.sh | bash
RUN nvim --headless +'call dein#install#_update([], "install", v:false)' +qall
RUN rm $HOME/.SpaceVim.d/init.toml
ENTRYPOINT /usr/local/bin/nvim

View File

@ -1,58 +0,0 @@
FROM python:3.6.5-stretch
ENV DEBIAN_URL "http://ftp.us.debian.org/debian"
RUN echo "deb $DEBIAN_URL testing main contrib non-free" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --allow-unauthenticated \
autoconf \
automake \
cmake \
fish \
g++ \
gettext \
git \
libtool \
libtool-bin \
lua5.3 \
ninja-build \
pkg-config \
unzip \
xclip \
xfonts-utils \
&& apt-get clean all
RUN cd /usr/src \
&& git clone https://github.com/neovim/neovim.git \
&& cd neovim \
&& make CMAKE_BUILD_TYPE=RelWithDebInfo \
CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local" \
&& make install \
&& rm -r /usr/src/neovim
ENV HOME /home/spacevim
RUN groupdel users \
&& groupadd -r spacevim \
&& useradd --create-home --home-dir $HOME \
-r -g spacevim \
spacevim
USER spacevim
WORKDIR $HOME
ENV PATH "$HOME/.local/bin:${PATH}"
RUN mkdir -p $HOME/.config $HOME/.SpaceVim.d
RUN pip install --user neovim pipenv
RUN curl https://raw.githubusercontent.com/SpaceVim/SpaceVim/master/docker/init.toml > $HOME/.SpaceVim.d/init.toml
RUN curl -sLf https://spacevim.org/install.sh | bash
RUN nvim --headless +'call dein#install#_update([], "install", v:false)' +qall
RUN rm $HOME/.SpaceVim.d/init.toml
ENTRYPOINT /usr/local/bin/nvim

View File

@ -3,10 +3,10 @@ HAVE_PODMAN := $(shell which podman 2>/dev/null)
build:
ifdef HAVE_DOCKER
docker build -t nvim -f Dockerfile.nvim-python3 .
docker build -t nvim -f Dockerfile .
else
ifdef HAVE_PODMAN
podman build -t nvim -f Dockerfile.nvim-python3 .
podman build -t nvim -f Dockerfile .
else
$(error "No docker or podman in $(PATH). Check if one was installed.")
endif

View File

@ -26,7 +26,7 @@ You can build using the supplied `Makefile`:
or call the command manually using:
docker build -t nvim -f Dockerfile.nvim-python3 .
docker build -t nvim -f Dockerfile .
### Run