Giter VIP home page Giter VIP logo

docker-dev's People

Contributors

aghost-7 avatar hardy613 avatar hardy925 avatar literallynotjesus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-dev's Issues

Add editorconfig to base neovim image

Will need to check if this works with all languages correctly though.

language defaults:

  • yaml (2 spaces)
  • python (4 spaces)
  • javascript (2 spaces)
  • typescript (2 spaces)
  • rust (4 spaces)
  • c (tabs)
  • ruby (2 spaces)
  • java (4 spaces)
  • sh (tabs)
  • everything else (4 spaces?)

bpython

  • switch from ptpython to bpython
  • automatically detect poetry's virtualenv.

Infra changes

Not quite sure where this is going to head, but I'm thinking about moving off of travis ci and using my own jenkins server.

I need to start splitting the build at the very least, its currently pretty close to the cap (50 minues).

ternjs

I need ternjs to be able to handle symlinks to paths inside a container to even consider using it. I think I could write a ternjs plugin which remaps the paths to locations which are valid outside the container.

load virtualenv automatically for ycm

Right now, its not able to grab completions for libraries not part of the standard library. This will need to detect:

  • if poetry is being used, load from that environment
  • if there is an env directory in the root of the project, with a bin/python executable, use that virtual environment.

Add de-escalated user

Should add a new user which doesn't have root/docker access for when running commands such as npm install (with just an alias). Could be tricky since I need to create the files with the same ownership as the original user, and also need to source the same bashrc (since nvm won't work otherwise).

Show language image is for in bottom right

Currently the hostname is displayed in the bottom right; its not particularity useful information. All I could think of which could be handy is having the language your tmux session is for. If you're working on flask + react you'll need to have one session for each language and its possible to mix up the sessions.

Screenshot from 2020-05-31 13-32-16

Use docker binary

Instead of installing docker in its entirety, I should only install the client since that's all I need. Should save a few megabytes...

Squash 18.04 base image

Since I'm reinstalling a whole lot of packages in my base image, it would probably take a lot less space if I squashed it.

Document building your own

  • Document benefits of containerizing environment.
  • Minimal tmux setup (no powerline).
  • Clipboard
  • From ubuntu:xenial, how to install basic tooling (git, ssh, curl, man, etc).
  • Minimal, language agnostic vim setup.
  • Specialize for a particular stack (nodejs web development).
  • docker and compose

Upgrade TMUX

Breaking changes were introduced in the newer version of TMUX. Need to figure how to get everything going on the newer version.

Refactor clipboard code

I want to be able to use my clipboard from any environment (either VM or native linux host). First step would be to add lemonade for a remote clipboard utility, then I could write a script like the following:

if [ -z "$DISPLAY" ]; then
  cat - | lemonade copy
else
  cat - | /usr/bin/xclip -selection clipboard
fi

My only concern is that I will then have two xclip executables on my path...

Would need to update the tmux configuration as well I think.

WASM rust?

Bundling emscripten could be nice for the rust image 🤷‍♂️

question about build.sh

I am trying to understand something with your build.sh. It has a number of 'apt-install' commands.

Is there a reason they are done in the script vs. the Dockerfile? If there were done in the Dockerfile, it seems like you could then better leverage docker layering. Just wondering.

TPM?

TMUX seems to have its own package manager. Maybe see what kind of plugins are out there?

Add Ubuntu 20.04

I could probably start adding images for 20.04 (they are already available on docker hub). Will hold off on the language-specific ones due to stuff being likely to break.

Add support for coursier

Coursier is a artefact fetcher for sbt. Since its able to download in parallel it is much faster than ivy2. Would be nice to add to the scala image.

Vader tests

Should add vader tests to ensure the autocompletion and such is always working.

This will require some major changes to the testing stuff. Every image should have a test directory which only executes if the image gets built:

  • test/vader contains the vader tests
  • test/sh contains some shell scripts to test docker run commands.

Cargo issues in rust-dev

Looks like cargo isn't added to the path and the registry has the wrong permissions in the rust container. Probably just need to move this line to the end of the build script and update path?
https://github.com/AGhost-7/docker-dev/blob/master/images/rust-dev/base/rust-install.sh#L7

❯ docker run --rm -v ~/Code/ring:/home/aghost-7/ring -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" -it aghost7/rust-dev:focal-stable /bin/bash
$ cd ring/
$ cargo build
bash: cargo: command not found
$ ~/.cargo/bin/c
cargo          cargo-clippy   cargo-fmt      cargo-miri     cargo-watch    clippy-driver
$ ~/.cargo/bin/cargo build
error: failed to get `untrusted` as a dependency of package `ring v0.16.15 (/home/aghost-7/ring)`

Caused by:
  failed to create directory `/home/aghost-7/.cargo/registry/index/github.com-1ecc6299db9ec823`

Caused by:
  Permission denied (os error 13)
$ ls -la ~/.cargo
total 36
drwxr-xr-x 1 aghost-7 aghost-7 4096 Oct 23 15:54 .
drwxr-xr-x 1 aghost-7 aghost-7 4096 Oct 24 21:29 ..
drwxr-xr-x 2 aghost-7 aghost-7 4096 Oct 23 16:05 bin
-rw-r--r-- 1 aghost-7 aghost-7  465 Oct 23 16:05 .crates2.json
-rw-r--r-- 1 aghost-7 aghost-7   99 Oct 23 16:05 .crates.toml
-rw-r--r-- 1 aghost-7 aghost-7   37 Oct 23 15:53 env
-rw-r--r-- 1 aghost-7 aghost-7    0 Oct 23 15:53 .package-cache
drwxr-xr-x 2 root     root     4096 Oct 23 15:51 registry

ptpython

Currently evaluating but it seems like a very nice python repl.

~/.ptpython/config.py thus far:

__all__ = (
  'configure',
)

def configure(repl):
  repl.vi_mode = True
  repl.confirm_exit = False
  repl.true_color = True

Don't bail if a leaf image fails to build

If an image without any dependents fails to build, it shouldn't prevent other images from building. build.py should still display the error and exit with a status code above 0 though.

System pre-commit hooks

Before committing, it should run static checks automatically if present in the project.

python

  • black
  • mypy

node

  • eslint
  • prettier (pretty-quick)

rust

  • rustfmt
  • clippy

Ruby image

There are two language server implementations:

Neither seem to work properly... will need to take a second look at getting the first one running as a container. Seems to be how the vscode plugin currently works.


plugin.vim:

Plug 'autozimu/LanguageClient-neovim', {
    \ 'branch': 'next',
    \ 'do': 'bash install.sh',
    \ }

post-plugin.vim:

nnoremap <F5> :call LanguageClient_contextMenu()<CR>
nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>

let workspaceVolume = '/home/jonathan/workspaces/foobar:/home/aghost-7/workspaces/foobar'

let g:LanguageClient_serverCommands = {
  \ 'ruby': ['docker', 'run', '-i', '--rm', '-v', workspaceVolume, 'mtsmfm/language_server-ruby:latest']
  \ }

Still need to find a good way to re-map the volume automatically, getcwd() from vim isnt going to be enough.


Also will require storing my environment stuff under ~/.rvm/rubies on the host...


todo list:

  • semantic completion / goto definition / fetch doc
  • improved repl: http://pryrepl.org/
  • debugger?

Move to deoplete where it makes sense

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.