mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-13 09:46:23 +00:00
Update for docker-cleanup
This commit is contained in:
@@ -8,16 +8,27 @@ So how can we use git on this system, to push/pull the changes we make to config
|
||||
|
||||
I [made a simple container](https://github.com/funkypenguin/git-docker/blob/master/Dockerfile) which just basically executes git in the CWD:
|
||||
|
||||
To use it transparently, add an alias for the "git" command:
|
||||
To use it transparently, add an alias for the "git" command, or just download it with the rest of the [handy aliases](https://raw.githubusercontent.com/funkypenguin/geek-cookbook/master/examples/scripts/gcb-aliases.sh):
|
||||
|
||||
```
|
||||
alias git='docker run -v $PWD:/var/data -v \
|
||||
/var/data/git-docker/data:/root funkypenguin/git-docker git'
|
||||
/var/data/git-docker/data/.ssh:/root/.ssh funkypenguin/git-docker git'
|
||||
```
|
||||
|
||||
## Limitations
|
||||
## Setup SSH key
|
||||
|
||||
docker run -v /var/data/git-docker/data:/root funkypenguin/git-docker ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519
|
||||
If you plan to actually _push_ using git, you'll need to setup an SSH keypair. You _could_ copy across whatever keypair you currently use, but it's probably more appropriate to generate a specific keypair for this purpose.
|
||||
|
||||
Generate your new SSH keypair by running:
|
||||
|
||||
```
|
||||
mkdir -p /var/data/git-docker/data/.ssh
|
||||
chmod 600 /var/data/git-docker/data/.ssh
|
||||
docker run -v /var/data/git-docker/data/.ssh:/root/.ssh funkypenguin/git-docker ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519
|
||||
```
|
||||
|
||||
The output will look something like this:
|
||||
```
|
||||
Generating public/private ed25519 key pair.
|
||||
Enter passphrase (empty for no passphrase): Enter same passphrase again: Created directory '/root/.ssh'.
|
||||
Your identification has been saved in /root/.ssh/id_ed25519.
|
||||
@@ -36,4 +47,6 @@ The key's randomart image is:
|
||||
|o..o..+.oo |
|
||||
|...=OX+.+. |
|
||||
+----[SHA256]-----+
|
||||
[root@ds3 data]#
|
||||
```
|
||||
|
||||
Now add the contents of /var/data/git-docker/data/.ssh/id_ed25519.pub to your git account, and off you go - just run "git" from your Atomic host as usual, and pretend that you have the client installed!
|
||||
|
||||
@@ -5,6 +5,8 @@ In order to avoid IP addressing conflicts as we bring swarm networks up/down, we
|
||||
Network | Range
|
||||
--|--
|
||||
[Traefik](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/traefik/) | _unspecified_
|
||||
[Docker-cleanup](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/docker-swarm-mode/#setup-automated-cleanup) |
|
||||
172.16.0.0/24
|
||||
[Mail Server](https://geek-cookbook.funkypenguin.co.nz/recipies/mail/) | 172.16.1.0/24
|
||||
[Gitlab](https://geek-cookbook.funkypenguin.co.nz/recipies/gitlab/) | 172.16.2.0/24
|
||||
[Wekan](https://geek-cookbook.funkypenguin.co.nz/recipies/wekan/) | 172.16.3.0/24
|
||||
|
||||
Reference in New Issue
Block a user