Skip to content
프로젝트

소개

VS Code처럼 Docker 컨테이너 안에서 개발할 수 있습니다.

시스템 및 인프라

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

NVIM-Remote-Containers

This plugin aims to give you the functionality of VSCode's remote container development plugin. It will allow you to spawn and develop in docker containers and pulls config information from a devcontainer.json file.

Available Lua Functions

  • parseConfig: parses devcontainer.json file--takes in argument specifying type (dockerCompose, dockerFile, image)
  • attachToContainer: Attaches to a docker container or builds a container from a user chose image
  • buildImage: Builds container from the Dockerfile specified in the devcontainer.json file. Takes a boolean parameter to determine whether or not to show the build process in a floating window or in the quickfix list.
  • composeUp: Brings docker-compose up
  • composeDown: Brings docker-compose down
  • composeDestroy: Destorys docker-compose containers

Available Vim Commands

  • AttachToContainer wrapper for the attachToContainer lua function.
  • BuildImage wrapper for the buildImage lua function, takes "true" or "false" as an argument to decide whether or not to show the build progress in a floating window.
  • StartImage lists all available images and starts the one selected by you given the arguments found in the devcontainer.json file in your project's workspace.
  • ComposeUp wrapper for composeUp lua function.
  • ComposeDown wrapper for composeDown lua function.
  • ComposeDestroy wrapper for composeDestroy lua function.

Extras

Set your statusline to reflect the current connected container through g:currentContainer:

hi Container guifg=#BADA55 guibg=Black
set statusline+=%#Container#%{g:currentContainer}

Usage

Before using this plugin, you should install the jsonc treesitter module: :TSInstall jsonc, this is needed to parse the config file.

If you are in the root directory that has the .devcontainer/ folder, you can run the following vim commands:

" If you haven't built the image specified in your config.
" Takes `true` or `false` depending on whether or not you want to see the build progress in a floating window.
:BuildImage
" Attach to the container you just built / a previously built container
:AttachToContainer
" Start a container from a pre-built image
:StartImage

" Runs the docker-compose -f <file> up
:ComposeUp
" Runs docker-compose -f <file> down
:ComposeDown
" Runs docker-compose rm <file> -fsv
:ComposeDestroy

Contributing

Lua code is formatted in a pre-commit hook using stylelua. Please install this as part of contributing to the project. Contributors using Linux may use the pre-push hook to ensure formatting. Install the pre-push hook by running tools/init.sh.

관련 프로젝트 살펴보기

불러오는 중…