-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f648b3a
commit c22962d
Showing
16 changed files
with
42 additions
and
3,443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +0,0 @@ | ||
[submodule "dotbot"] | ||
path = dotbot | ||
url = https://github.com/anishathalye/dotbot | ||
ignore = dirty | ||
[submodule "dotbot-git"] | ||
path = dotbot-git | ||
url = https://github.com/DrDynamic/dotbot-git.git | ||
[submodule "nvim-dotfile"] | ||
path = nvim-dotfile | ||
url = https://github.com/wongsingfo/nvim-dotfile | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,54 @@ | ||
# Dotfiles | ||
# Dockerize the Dotfiles | ||
|
||
It's time to create your own dotfiles. [This blog post by Anish Athalye](https://www.anishathalye.com/2014/08/03/managing-your-dotfiles/) demonstates the necessity and fun to tweak and optimize one's own dotfiles. | ||
Have you ever been in a situation where you need to reconfigure your | ||
development environment every time you face a new machine? The relentless cycle | ||
of package installations, dotfile transfers, and occasionally wrestling with | ||
network proxies can be downright maddening. But worry not, we can harnessed the | ||
power of Docker, to deliver a solution that will forever change the way you set | ||
up your development environment. With just one command, you can wave goodbye to | ||
the days of manual configuration. | ||
|
||
Dotfiles need to be easy to manage and udpate. Here are some amazing management suites for dotfiles: | ||
## Quick Start | ||
|
||
- [rcm](https://github.com/thoughtbot/rcm) | ||
- [dotbot](https://github.com/anishathalye/dotbot) | ||
First, ensure that you have Docker installed. If you're using the apt package | ||
manager, you can do so with the following command: | ||
|
||
## Learn from Others' Configurations | ||
``` | ||
sudo apt install docker.io | ||
``` | ||
|
||
Now, you're ready to begin using our Dockerized Dotfiles. Start by running this | ||
command: | ||
|
||
``` | ||
docker run -it -v $(pwd):/work -v $HOME/.ssh:/home/ubuntu/.ssh --name box wongsingfo/dotfiles | ||
``` | ||
|
||
- https://github.com/anishathalye/dotfiles | ||
- https://github.com/thoughtbot/dotfiles | ||
To detach from the container, use the default key combination: Ctrl-P followed | ||
by Ctrl-Q. | ||
|
||
## Docker | ||
If you need to re-enter the container, execute the following: | ||
|
||
``` | ||
sudo apt install docker.io | ||
# We change the detach keys to avoid the confliction with the `Previous` command in the shell | ||
docker start -i --detach-keys='ctrl-z,e' box | ||
``` | ||
|
||
docker run -it -v $(pwd):/work --name box wongsingfo/dotfiles | ||
## Troubleshhot | ||
|
||
### Permission Issues | ||
|
||
If you encounter permission problems, it may be because the container uses the | ||
user ID 1000 by default, and the files under $(pwd) do not belong to this user. | ||
One solution is to modify the user ID of the 'ubuntu' user inside the | ||
container: | ||
|
||
``` | ||
# Suppose the user ID of the current user is 1004 | ||
sudo su -c 'usermod -u 1004 ubuntu && groupmod -g 1004 ubuntu' | ||
rm -rf /tmp/fish.ubuntu | ||
docker start -i --detach-keys='ctrl-z,e' box | ||
# Flush the Fish shell cache | ||
rm -rf /tmp/fish.ubuntu | ||
``` | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Submodule dotbot
deleted from
4ec846
Submodule dotbot-git
deleted from
127d21
This file was deleted.
Oops, something went wrong.
Submodule nvim-dotfile
deleted from
4025e2
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.