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

Use the official Docker image #57

Open
abitrolly opened this issue Jul 24, 2023 · 5 comments
Open

Use the official Docker image #57

abitrolly opened this issue Jul 24, 2023 · 5 comments

Comments

@abitrolly
Copy link

There is an official Docker image for snapcraft https://snapcraft.io/docs/snapcraft-docker-images

Using it as an official docker container action will make the image more maintainable and will allow to build snaps on open source CI systems, such as GitLab.

@abitrolly
Copy link
Author

I am doing some maintenance fixes to it canonical/snapcraft#4290 but I am unemployed and my abilities are limited.

@jhenstridge
Copy link
Collaborator

I'm not sure how that would help. As written, the aim of the action is to build the snap in the environment it is intended to be built in. To build a snap with Docker, you need to pick an image that matches the snap (e.g. an Ubuntu 20.04 image to build core20 based snaps, an Ubuntu 22.04 image to build core22 based snaps, etc).

If this was a docker action, we'd need different versions of the action to support each base, and detect if people were using the wrong version of the action. That seems worse.

As far as Gitlab and other CI systems go, I'd expect any common functionality to exist in Snapcraft itself. As it stands, this action just contains what's needed to get Snapcraft up and running on Github's runners. What would you expect to reuse from this action in other CI systems?

@abitrolly
Copy link
Author

Docker images can be cached, so they should init and run faster, saving time and compute credits.

I was not really aware that GitHub Actions don't allow to select Docker image dynamically. Or call another image from an image.

@abitrolly
Copy link
Author

I needed Docker, because snapcraft doesn't work on Fedora. Some SELinux issues, I don't know.

@jhenstridge
Copy link
Collaborator

If you've got issues with Snapcraft itself, I suggest filing an issue at https://github.com/snapcore/snapcraft/issues.

This is just the glue code to run Snapcraft on the Github Actions runners. It has nothing to do with running Snapcraft locally or on different CI systems. Anything shared between those environments should be happening in Snapcraft so everyone benefits.

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

No branches or pull requests

2 participants