Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Support daemonless, unprivileged Docker builds with img #970

Merged
merged 14 commits into from
Jan 14, 2021
Merged

Conversation

mitchellh
Copy link
Contributor

This modifies the "docker" builder to support daemonless, unprivileged image builds using img: https://github.com/genuinetools/img

The fact we use img is encapsulated and not exposed to the user. This gives us the ability to use any tool in the future if we choose to go a different path. The important part is that the Docker builder does support a daemonless approach.

This is important for the runner functionality coming up so that Waypoint runners that will likely be running in containerized environments are able to perform image builds.


This PR only modifies the "docker" builder and entrypoint injection.

A future PR will modify the registry, docker-pull, and more`. I just didn't want to overwhelm reviewers.

"seccomp=unconfined",
"apparmor=unconfined",
},
}, &network.NetworkingConfig{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this is only modifying how we install the runner and not the server.

(And the runner install stuff is currently behind a hidden experimental flag)

Previously, the step ID was calculated based on `len(sg.steps)` which
ensured that it was always unique for each new step. But this is only
true as long as there is only one step group ever created.

In cases where multiple step groups are created, this caused old steps
to be reused and it caused some confusing terminal behavior (old lines
would be overwritten as the UI framework did its best to update them).

This moves the step ID counter to the UI level so it is guaranteed to be
monotonically increasing for all steps for that UI.
Dockerfile Show resolved Hide resolved
Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🖼️ 👍

Daemonless, unprivileged Docker registry implementation
@mitchellh mitchellh merged commit a8df33f into main Jan 14, 2021
@mitchellh mitchellh deleted the f-img branch January 14, 2021 19:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants