Skip to content

marcopiraccini/penv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

penv

License: MIT

This has been strongly inspired by https://github.com/rylandg/myos. Please look at it, it's a great idea! However this is different because it assumes that everyone will customize the Dockerfile to build his own image locally.

Description

I use different laptops (one with Linux and another with OSx) but I'd like to have the same conf. I could use dotfiles like these, but actually is hard to have a really portable configuration, The idea to solve this is to use a docker container, so the dev env will be EXACTLY the same in both cases.

The tools installed in default Dockerfile are:

  • neovim
  • zsh + oh_my_zsh
  • atom
  • tmux
  • nvm
  • rustp

All is accessed through SSH with a key generated by the setup.sh script. A host folder with the workspace is mounted (see below) so it's possible to work on host folders from the container NOTE: the Dockerfile sets the user so the container user is the same as the host user ** ATOM IS COMMENTED, CAUSE NOT WORKING IN OSX **

Usage

Clone the repo, then you have to customize the docker-compose.yml file specifying:

  • The posizion of the projects. This will mount ~/workspaces in /opt/workspaces:
volumes:
  -  "~/workspaces:/opt/workspaces"
  • The secrets to be used inside the container (for instance to access github using ssh):
secrets:
  host_ssh_key:
    file: ~/.ssh/id_rsa

Then, create the image and the container using ./setup.sh.

Once the container is up&running (verify using docker ps), connect using:

./penv.sh

You might want to alias it:

alias penv="/path/to/penv/repo/penv.sh"

Prerequisites

Recent versions of docker and docker-compose

Customization points:

Atom

  • ~~atom/config.cson: atom configuration ~~
  • ~~atom/atom-packages-list.txt: plugins installed ~~
  • ~~in Dockerfile: the version installed is specified by the line: ENV ATOM_VERSION "v1.40.1" ~~

tmux:

  • tmux/.tmux.conf

vim:

  • vim/init.vim

zsh:

  • zsh/.zlogin
  • zsh/.zshenv
  • zsh/.zshrc

Known Issues

  • X not really working on OSx (tried with https://www.xquartz.org/). It's very very slow and crashes after a while. As consequence, atom is not really usable on OSx. So not installing atom + plugins.

About

Container based solution for portable dev tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published