1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-18 17:51:31 +01:00
dotfiles/dev/README.md

Failed to ignore revisions in .git-blame-ignore-revs.

58 lines
1.3 KiB
Markdown
Raw Normal View History

# dev
This directory contains some useful dockerfiles/makefiles that can be used
to test the deployment ansible playbooks.
```bash
make arch # this builds a docker image based on archlinux and runs it
make debian # this builds a docker image based on debian and runs it
```
## Workflow
Start a builder in one shell:
```bash
while true; do make _run; done
```
2024-07-04 12:21:21 +02:00
Check for the docker IP of the started container:
```bash
2024-07-04 12:21:21 +02:00
docker inspect dotfiles-dev --format '{{.NetworkSettings.IPAddress}}'
```
2024-07-04 12:21:21 +02:00
Make sure that this matches the IP in [ansible-hosts](/dev/ansible-hosts)
Test the playbook:
```bash
ansible-playbook -v -i ansible-hosts ../playbook.yml
```
2020-12-08 22:06:03 +01:00
## Docker images
- Build: `make build-arch` or `make build-debian` to build the image.
- Run: `make run` to run the docker container. This bind-mounts `../` to
`/root/.dotfiles`, making it possible to test the repo in the container.
## Docker + Ansible
Run `dotfiles-dev` image using `make run`. This starts the container with
the local repository bind-mounted on `/root/.dotfiles`. To use a custom volume:
```bash
docker run -v <volume>:/root/dofiles`
```
Ansible can now be used to test the installation.
2024-07-04 12:21:21 +02:00
```bash
make ansible
```
## Releasing
Use `make release` to build an image from scratch, run it, install dotfiles
in the container using ansible, then commit the resulting container.