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.
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 **
Clone the repo, then you have to customize the docker-compose.yml file specifying:
- The posizion of the projects. This will mount
~/workspacesin/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"Recent versions of docker and docker-compose
- ~~
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.conf
vim/init.vim
zsh/.zloginzsh/.zshenvzsh/.zshrc
- 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.