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

build(docker): remove docker build

This commit is contained in:
Eric Wong 2024-03-23 16:07:25 +08:00
parent 70e2ea7d03
commit 90b7a0b733
6 changed files with 0 additions and 361 deletions

View File

@ -1,41 +0,0 @@
FROM ubuntu:latest
MAINTAINER Shidong Wang <wsdjeg@outlook.com>
RUN apt update && \
apt install -y \
neovim \
curl \
python3-dev \
python3-pynvim \
lua5.3 \
git \
universal-ctags \
silversearcher-ag && \
apt 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 PYTHON3_HOST_PROG "/usr/bin/python3"
RUN mkdir -p $HOME/.config $HOME/.SpaceVim.d
RUN curl https://gitlab.com/SpaceVim/SpaceVim/-/raw/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 nvim

View File

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

View File

@ -1,43 +0,0 @@
## SpaceVim in DockerHub
![Docker Automated build](https://img.shields.io/docker/automated/spacevim/spacevim)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/spacevim/spacevim?sort=date)
[![Docker Pulls](https://img.shields.io/docker/pulls/spacevim/spacevim)](https://hub.docker.com/r/spacevim/spacevim)
This Dockerfile builds neovim `HEAD` and installs the latest available version of SpaceVim. You might want to use this for several reasons:
- Have a consistent version of Neovim and SpaceVim as long as the machine supports Docker.
- Try SpaceVim without modifying your current Vim/Neovim configuration.
- Try the latest Neovim with SpaceVim.
- Try SpaceVim with a newer version of Python.
- Debug SpaceVim configurations. e.g. when posting a bug report if you can reproduce it in this container then there's a higher chance that it is a true bug and not just an issue with your machine.
### FAQ
Isn't Docker stateless? Won't I have to reinstall all plugins each time I launch the container?
- During the build we call `dein#install()` so all plugins are installed and frozen. Your custom configurations can be added as an additional build step using the Docker `COPY` command.
### Build
You can build using the supplied `Makefile`:
make build
or call the command manually using:
docker build -t nvim -f Dockerfile .
### Run
You can run the container using:
docker run -it nvim
but that isn't terribly useful since changes made inside the container won't be visible outside. More useful is mounting the current working directory inside the container:
docker run -it -v $(pwd):/home/spacevim/src nvim
Even better is an alias `dnvim` which will do this automatically:
alias dnvim='docker run -it -v $(pwd):/home/spacevim/src nvim'

View File

@ -1,232 +0,0 @@
#=============================================================================
# init.toml --- Docker config temp file
# Copyright (c) 2016-2023 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg@outlook.com >
# URL: https://spacevim.org
#=============================================================================
# SpaceVim options {{{
[options]
# vimcompatible = true
# enable_language_specific_leader = false
# }}}
## -- SpaceVim layer list start
[[layers]]
name = "VersionControl"
[[layers]]
name = "autocomplete"
[[layers]]
name = "chat"
[[layers]]
name = "checkers"
[[layers]]
name = "chinese"
[[layers]]
name = "colorscheme"
[[layers]]
name = "core#banner"
[[layers]]
name = "core#statusline"
[[layers]]
name = "core#tabline"
[[layers]]
name = "core"
[[layers]]
name = "cscope"
[[layers]]
name = "ctrlp"
[[layers]]
name = "debug"
[[layers]]
name = "default"
[[layers]]
name = "denite"
[[layers]]
name = "edit"
[[layers]]
name = "floobits"
[[layers]]
name = "format"
[[layers]]
name = "fzf"
[[layers]]
name = "git"
[[layers]]
name = "github"
[[layers]]
name = "japanese"
[[layers]]
name = "lang#WebAssembly"
[[layers]]
name = "lang#agda"
[[layers]]
name = "lang#asciidoc"
[[layers]]
name = "lang#autohotkey"
[[layers]]
name = "lang#c"
[[layers]]
name = "lang#clojure"
[[layers]]
name = "lang#csharp"
[[layers]]
name = "lang#dart"
[[layers]]
name = "lang#dockerfile"
[[layers]]
name = "lang#elixir"
[[layers]]
name = "lang#elm"
[[layers]]
name = "lang#erlang"
[[layers]]
name = "lang#extra"
[[layers]]
name = "lang#fsharp"
[[layers]]
name = "lang#go"
[[layers]]
name = "lang#haskell"
[[layers]]
name = "lang#html"
[[layers]]
name = "lang#java"
[[layers]]
name = "lang#javascript"
[[layers]]
name = "lang#julia"
[[layers]]
name = "lang#kotlin"
[[layers]]
name = "lang#latex"
[[layers]]
name = "lang#lisp"
[[layers]]
name = "lang#lua"
[[layers]]
name = "lang#markdown"
[[layers]]
name = "lang#nim"
[[layers]]
name = "lang#ocaml"
[[layers]]
name = "lang#perl"
[[layers]]
name = "lang#php"
[[layers]]
name = "lang#plantuml"
[[layers]]
name = "lang#puppet"
[[layers]]
name = "lang#purescript"
[[layers]]
name = "lang#python"
[[layers]]
name = "lang#ruby"
[[layers]]
name = "lang#rust"
[[layers]]
name = "lang#scala"
[[layers]]
name = "lang#sh"
[[layers]]
name = "lang#swift"
[[layers]]
name = "lang#typescript"
[[layers]]
name = "lang#vim"
[[layers]]
name = "lang#vue"
[[layers]]
name = "lsp"
[[layers]]
name = "leaderf"
[[layers]]
name = "shell"
[[layers]]
name = "sudo"
[[layers]]
name = "tags"
[[layers]]
name = "tmux"
[[layers]]
name = "tools#dash"
[[layers]]
name = "tools"
[[layers]]
name = "ui"
## -- SpaceVim layer list end

View File

@ -17,7 +17,6 @@ lang: zh
- [安装指南](#安装指南)
- [Linux 或 macOS](#linux-或-macos)
- [Windows](#windows)
- [Docker 支持](#docker-支持)
- [基本配置](#基本配置)
- [在线教程](#在线教程)
- [其他资源](#其他资源)
@ -47,23 +46,6 @@ curl -sLf https://spacevim.org/cn/install.sh | bash -s -- -h
Windows 下最快捷的安装方法是下载安装脚本 [install.cmd](https://spacevim.org/cn/install.cmd) 并运行。
## Docker 支持
```sh
docker pull spacevim/spacevim
docker run -it --rm spacevim/spacevim nvim
```
也可以通过挂载的方式载入本地配置:
```sh
docker run
\ -it -v
\ ~/.SpaceVim.d:/home/spacevim/.SpaceVim.d
\ --rm
\ spacevim/spacevim nvim
```
## 基本配置
SpaceVim 的默认配置文件为 `~/.SpaceVim.d/init.toml`。下面为一简单的配置示例。

View File

@ -17,7 +17,6 @@ It will give you a good idea of what SpaceVim is like.
- [Installation](#installation)
- [Linux and macOS](#linux-and-macos)
- [Windows](#windows)
- [Run in docker](#run-in-docker)
- [Configuration](#configuration)
- [Online tutorials](#online-tutorials)
- [Learning SpaceVim](#learning-spacevim)
@ -70,19 +69,6 @@ and a C compiler (like `gcc`) to build the dll.
The easiest way is to download and run [install.cmd](../install.cmd) or install [SpaceVim manually](../faq/#how-to-install-spacevim-manually). The script installs or updates SpaceVim (if it exists) for Vim and Neovim.
## Run in docker
```sh
docker pull spacevim/spacevim
docker run -it --rm spacevim/spacevim nvim
```
You can also load local configurations:
```sh
docker run -it -v ~/.SpaceVim.d:/home/spacevim/.SpaceVim.d --rm spacevim/spacevim nvim
```
## Configuration
The default configuration file of SpaceVim is `~/.SpaceVim.d/init.toml`. This is