https://github.com/hashfyre/docker-check-access
https://godoc.org/github.com/wercker/docker-check-access
https://github.com/hashfyre/docker-check-access
Last synced: 2 months ago
JSON representation
https://godoc.org/github.com/wercker/docker-check-access
- Host: GitHub
- URL: https://github.com/hashfyre/docker-check-access
- Owner: Hashfyre
- License: apache-2.0
- Created: 2017-02-14T12:00:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-23T22:47:21.000Z (over 8 years ago)
- Last Synced: 2025-02-07T08:49:03.198Z (4 months ago)
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker-Check-Access
Sometimes you find yourself between a rock and hard place. In this case, you're in charge of a multi-tenant docker environment but you're not in directly in charge of authorization of all the containers in your system. What do you do?
Well, this package is designed to help with that. We'll make calls to a docker registry provider on your behalf to find out if a user has permission to touch a container in your docker environment.
Example use:
```go
package modifyimport (
"github.com/fsouza/go-dockerclient"
"github.com/wercker/docker-check-access"
)func ModifyLocalContainer(auth auth.Authenticator, container *docker.Container) error {
//check to see if we have an error, or we can't access
if ok, err := auth.CheckAccess(); err != nil || !ok {
return errors.New("You can't access that!")
}
// move along with messing with your local container
}
```