Skip to content

Commit

Permalink
dockerize the dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
wongsingfo committed Oct 27, 2023
1 parent f648b3a commit c22962d
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 3,443 deletions.
10 changes: 0 additions & 10 deletions .gitmodules
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
55 changes: 42 additions & 13 deletions README.md
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
```


74 changes: 0 additions & 74 deletions bashrc

This file was deleted.

9 changes: 0 additions & 9 deletions config.fish

This file was deleted.

1 change: 0 additions & 1 deletion dotbot
Submodule dotbot deleted from 4ec846
1 change: 0 additions & 1 deletion dotbot-git
Submodule dotbot-git deleted from 127d21
11 changes: 0 additions & 11 deletions gitconfig

This file was deleted.

17 changes: 0 additions & 17 deletions install

This file was deleted.

39 changes: 0 additions & 39 deletions install.conf.yaml

This file was deleted.

1 change: 0 additions & 1 deletion nvim-dotfile
Submodule nvim-dotfile deleted from 4025e2
6 changes: 0 additions & 6 deletions nvim/init.vim

This file was deleted.

Loading

0 comments on commit c22962d

Please sign in to comment.