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

Add snap support for docker interface for app dev builds #1214

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

nicktate
Copy link
Contributor

Description

What does this pull request accomplish

Adds app-dev-build plug w/ the docker interface

This will require the user to have docker installed via snap and execute snap connect doctl:app-dev-build docker:docker-daemon to grant permissions

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

snap/snapcraft.yaml Outdated Show resolved Hide resolved
@andrewsomething
Copy link
Member

Also wanted to point out that we do have a few places where we do some custom error messages to point snap users in the right direction. E.g.

doctl/commands/registry.go

Lines 425 to 429 in 51c4f6b

_, isSnap := os.LookupEnv("SNAP")
if os.IsPermission(err) && isSnap {
warn("Using the doctl Snap? Grant access to the doctl:dot-docker plug to use this command with: sudo snap connect doctl:dot-docker")
return err
}

Might want to consider doing that for app dev builds as well.

@nicktate
Copy link
Contributor Author

Also wanted to point out that we do have a few places where we do some custom error messages to point snap users in the right direction. E.g.

doctl/commands/registry.go

Lines 425 to 429 in 51c4f6b

_, isSnap := os.LookupEnv("SNAP")
if os.IsPermission(err) && isSnap {
warn("Using the doctl Snap? Grant access to the doctl:dot-docker plug to use this command with: sudo snap connect doctl:dot-docker")
return err
}

Might want to consider doing that for app dev builds as well.

💯 @kamaln7 and I were just talking about this as well. I will add it in, thanks for the reference

@nicktate nicktate merged commit 9e6c7e0 into digitalocean:feature/appdev Aug 22, 2022
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 19, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 20, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 20, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 20, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 20, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 20, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
nicktate added a commit to nicktate/doctl that referenced this pull request Sep 21, 2022
…n#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message
andrewsomething pushed a commit that referenced this pull request Sep 22, 2022
* Feature/appdev (#1204)

* apps: add base scaffolding for app dev command subtree

* charm templates: change up method signatures for easier use

* only use 1.18.x in ci

* add internal package to unit test

* disable interactive mode

* only use logging pager in interactive mode

Co-authored-by: Kamal Nasser <[email protected]>

* extract pager component and improve build log output

* Add support for an app dev config and management (#1208)

* Add support for build environment variables (#1209)

* confirmation prompt component

* text input component

* Add support for build command overrides (#1211)

* Add copy on write support for CNB builds (#1213)

* confirm: display result options

* split off list subpackage

* split off pager subpackage

* split off template and textbox packages

* StyledText for icons

* split off text component

* improve indent util

* confirm: clarify prompt persistance behavior

* Add snap support for docker interface for app dev builds (#1214)

* Add snap support for docker interface for app dev builds

* add snap warning message

* support cnb versioning, clean up build envs (#1215)

* add support for local cnb caching (#1216)

* add support for local cnb caching

* address pr feedback

* charm: improved output handling, add warning textbox variant

* add config interfaces and types

* use new config interfaces, add support for per-component config

* address pr feedback, app dev workspace

* structured config

* unexport Config.AppID and config.AppSpecPath

* unexport internal method

* fix unclosed file handler in tests

* test setting and unsetting component-level settings

* appdev: handle user cancellation, log pager styling updates (#1229)

* correctly handle user cancellation

* log pager: update header/footer styling, scroll indicator

* log pager: add title spinner

* add support to build static site server image

* add docker support for static builds

* docker static site build cleanup

* docker static site build tests

* cnb static site build cleanup

* cnb static site build tests

* docker static site build input validation updates

remove /var/run/docker.sock dependency from tests

* fix path handling on windows

* intercept ctrl-c to exit cleanly

* Ntate/appdev/macossupport (#1235)

* mount docker.sock.raw for mac docker-for-desktop

* update local builder to v0.50.2

* support for windows docker-for-desktop (#1238)

* appdev: pull required container images (#1240)

* pull required container images

* pull cnb stack run image

* update no app spec error message

* vendor latest godo

* bump godo to v1.85.0

* support new godo interface types

* address pr feedback

* add better help messaging for app dev config

Co-authored-by: Kamal Nasser <[email protected]>
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.

3 participants