-
Notifications
You must be signed in to change notification settings - Fork 339
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
snap: initial packaging #138
base: main
Are you sure you want to change the base?
Conversation
Opened #139 for failing CI, which is unrelated to the changes on this branch. |
Hi @samuelkarp, I'm looking into this. To address your questions:
My branch is here: https://github.com/stilvoid/amazon-ecr-credential-helper/tree/snap/snap |
Hi @stilvoid, thank you for taking a look!
Is
Does
I'd like to have the auto-alias. I was talking with @davdunc about this (as he helps manage the Snap store account for AWS) and he did end up creating the snap listing for the name we want, but it ended up falling off both of our radars for now. I'll restart that discussion.
That might work, though I still want to make sure that the snap includes the manual page and the licensing files. |
I'm building and running from Arch Linux so... nope ;)
Can snaps even do that? The man page wouldn't be able to live under |
I'm hoping that they will in the future :) I'm really more concerned about the licensing files (LICENSE, NOTICE, and THIRD-PARTY-LICENSES) than I am about the man page, though I would like the man page to be included as well. |
So we can certainly include those in the snap but they'll just live in I've included the license info in my
|
That's fine, I'd rather have them included in the package than not included. Want to send me a PR for the |
Looks like canonical/docker-snap#10 covers some complications that would make it hard to use both the Docker snap and a snap of this credential helper together. |
Description of changes:
Initial packaging as a snap package.
This needs review in the following areas:
classic
confinement? Thehome
plug does not allow reading hidden directories, and we need to read~/.aws
(and write to~/.ecr
, but that could really be confined inside the snap's$HOME
instead of the user's).snapcore/snapcraft
Docker image is based on Ubuntu 16.04, which does not have a new enoughgolang-go
package for this project to build. Consequently, I wrote a Dockerfile to build from Ubuntu 18.04 which has Go 1.10 available.docker-credential-ecr-login
as that seems to be the only way for a binary nameddocker-credential-ecr-login
to be added to the user's$PATH
, and Docker requires that naming scheme. Is it possible to name the snap something more meaningful (likeamazon-ecr-credential-helper
while still exposing a binary that appears asdocker-credential-ecr-login
in$PATH
?override-build
to control the build process and actually use ourMakefile
, but it does then mean manually handling copying files to the appropriate location. Is there a way to either still use ourMakefile
or to inject the appropriate Go options (including injecting the project version and commit into the binary)?/cc @davdunc
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.