Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docker): apply configuration on first boot #1097

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

milas
Copy link
Contributor

@milas milas commented Aug 6, 2024

The initialization sequence is:
(1) VM boot
(2) Write daemon configuration

When the VM boot, the Docker systemd service is started, so the new configuration is not picked up until the next VM boot.

To fix this, reload the systemd daemon config (to pick up the systemd service file written by addHostGateway) and then restart the Docker systemd service, which will use the new systemd unit file as well as any customizations to daemon.json.

Related Issues

(My specific issue was that my daemon.json customizations in the docker section of colima.yaml were not being applied on first boot.)

The initialization sequence is:
 (1) VM boot
 (2) Write daemon configuration

When the VM boot, the Docker systemd service is started, so the
new configuration is not picked up until the next VM boot.

To fix this, reload the systemd daemon config (to pick up the
systemd service file written by `addHostGateway`) and then restart
the Docker systemd service, which will use the new systemd unit
file as well as any customizations to `daemon.json`.
@abiosoft
Copy link
Owner

abiosoft commented Aug 6, 2024

Thanks :)

@abiosoft abiosoft merged commit 5321c10 into abiosoft:main Aug 6, 2024
11 checks passed
@milas milas deleted the fix/docker-reload branch August 6, 2024 20:33
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 10, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [abiosoft/colima](https://github.com/abiosoft/colima) | patch | `v0.7.0` -> `v0.7.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>abiosoft/colima (abiosoft/colima)</summary>

### [`v0.7.1`](https://github.com/abiosoft/colima/releases/tag/v0.7.1)

[Compare Source](abiosoft/colima@v0.7.0...v0.7.1)

#### Highlights

This is an incremental release with bug fixes.

-   Interrupted disk image download will now resume on subsequent `colima start`.
-   Docker container port mapping to specific host IP addresses is now supported.

For more details about v0.70 features, check [v0.70 release notes](https://github.com/abiosoft/colima/releases/tag/v0.7.0).

#### Other Fixes

-   Disk image downloader no longer duplicating downloads. Fixes [#&#8203;1098](abiosoft/colima#1098)
-   Support for binding to host IP address in containers. Fixes [#&#8203;492](abiosoft/colima#492)
-   Ensure proper loading of docker deamon settings on startup. Fixes [#&#8203;902](abiosoft/colima#902)
-   Running multiple Colima profiles with k3s enabled. Fixes [#&#8203;1087](abiosoft/colima#1087)

#### Commits

-   k3s: use random port for cluster API by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1088
-   k3s: re-use default port for existing instances by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1090
-   net: support forwarding to specific host IP addresses by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1091
-   core: nested virtualization and other fixes by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1094
-   build(deps): bump golang.org/x/term from 0.22.0 to 0.23.0 by [@&#8203;dependabot](https://github.com/dependabot) in abiosoft/colima#1095
-   fix(docker): apply configuration on first boot by [@&#8203;milas](https://github.com/milas) in abiosoft/colima#1097
-   core: fix downloader duplicating downloads by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1099
-   core: update disk images by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1102

**Full Changelog**: abiosoft/colima@v0.7.0...v0.7.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants