snapcraft io что такое
About Snaps
Snaps are app packages for desktop, cloud and IoT that are easy to install, secure, cross‐platform and dependency‐free. Snaps are discoverable and installable from the Snap Store, the app store for Linux with an audience of millions.
A snap is a bundle of an app and its dependencies that works without modification across Linux distributions.
Snapd
Snapd is the background service that manages and maintains your snaps, automatically.
Snap Store
The Snap Store provides a place to upload snaps, and for users to browse and install the software they want.
Snapcraft
Snapcraft is the command and the framework used to build and publish snaps.
A universal store
Snaps run not only on desktops but also on IoT devices, servers and clouds
Snaps work across Linux on many distributions and versions. Bundle your dependencies and assets, to simplify installs to a single standard command.
Built, published and hosted for free
Our build infrastructure and the Snap Store makes building and publishing snaps a breeze
Whether your project is hosted on GitHub or not, you can leverage our build system to both build and release to the edge channel, ensuring users always stay up‐to‐date.
Software distribution in your hands
With Snapcraft, you are in control of when and how you publish your Snap
With channels users can find their preferred balance between stability and the latest features. Though nothing is enforced, users expect the “Stable” channel to be well tested and updated less frequently, whereas the “Edge” channel is where they’ll get the latest release as soon as it’s available.
Open source, but not only
Snaps can bundle both proprietary applications and open source
If you build proprietary software you can use the “Proprietary” license. For open source projects we support SPDX expressions so you can let your users know exactly what license your project uses.
© 2021 Canonical Ltd.
Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Powered by Charmed Kubernetes
Snapcraft lets you build with the tools you already use
With support for many languages out of the box, getting started with Snapcraft can be as simple as installing and running snapcraft.
Publish from your developer workstation
Linux, macOS or Windows
To develop snaps you have Linux support via Snaps, macOS support via homebrew and Windows support via WSL. With whichever OS you’re comfortable with, you can develop and publish snaps.
If you already have an Electron app for Windows and macOS, you only need to make minimal changes to your package.json to build a snap that’s ready to release. Get started with an Electron app.
Learn how to snap an app in 30 minutes
What language or framework does your app use?
Why are snaps good for C/C++ projects?
In just a few steps, you’ll have an example C/C++ app in the Snap Store.
Here’s how dosbox defines snapcraft.yaml:
Why are snaps good for Electron projects?
In just a few steps, you’ll have an example Electron app in the Snap Store.
Here’s how to use it with electron-quick-start:
Why are snaps good for Flutter projects?
In just a few steps, you’ll have an example Flutter app in the Snap Store.
Here’s how super-cool-app defines snapcraft.yaml:
Why are snaps good for Go projects?
Programming in Go makes it easy to create a zip of your app that runs across Linux, without dependencies. However, end user discovery and update management remain a challenge. Snaps fill this gap, letting you distribute a Go app in an app store experience for end users.
In just a few steps, you’ll have an example Go app in the Snap Store.
Here’s how httplab defines snapcraft.yaml:
Why are snaps good for Java projects?
Distributing a Java application for Linux and reaching the widest possible audience is complicated. Typically, the user has to make sure the JRE/SDK version and their environment are configured correctly. When a Linux distribution changes the delivered JRE, this can be problematic for applications. Snapcraft ensures the correct JRE is shipped alongside the application at all times.
In just a few steps, you’ll have an example Java app in the Snap Store.
Here’s how freeplane defines snapcraft.yaml:
Why are snaps good for MOOS projects?
In just a few steps, you’ll have an example MOOS app in the Snap Store.
Here’s an example snapcraft.yaml that uses MOOS:
Why are snaps good for Node.js projects?
With npm you can distribute apps to other developers, but it’s not tailored to end users. Snaps let you distribute your Node app in an app store experience.
In just a few steps, you’ll have an example Node.js app in the Snap Store.
Here’s how wethr defines snapcraft.yaml:
Why are snaps good for pre-built apps?
Distributing the Linux build of your app as a zip lets you provide one download and set of instructions for all of Linux. However, end user discovery and update management remain a challenge. Snaps fill this gap, letting you wrap your existing Linux build in an app store experience for end users.
In just a few steps, you’ll have an example pre-built app in the Snap Store.
How geekbench4 defines snapcraft.yaml
Why are snaps good for Python projects?
With PyPI you can distribute apps to other developers, but it’s not tailored to end users. Virtualenv lets you install an app’s dependencies in isolation, but it’s not automatically used for installs from PyPI. Snaps let you distribute a dependency-isolated Python app in an app store experience for end users.
In just a few steps, you’ll have an example Python app in the Snap Store.
Snapcraft overview
Snapcraft is a powerful and easy to use command line tool for building snaps. It helps you to:
On Linux distributions with snap support, the easiest way to install snapcraft is via its snap:
Snapcraft can also be installed and run on Apple’s macOS. See Install snapcraft on macOS for details.
See below for a general overview of Snapcraft’s capabilities, and see Creating a snap for a more detailed look at the process, alongside a selection of self-contained examples for some popular languages and frameworks, including Go, Python and C/C++.
If you’re using an apt installed version of snapcraft, such as the package for Ubuntu 18.04 LTS, you need to remove this ( sudo apt remove snapcraft ) and install snapcraft from its snap to access the latest features.
Working with snapcraft
At the heart of the snapcraft build process is a file called snapcraft.yaml. This file describes a snap’s build dependencies and run-time requirements, it integrates remote repositories and extensions, and runs custom scripts and hooks for better integration with CI systems.
Snapcraft 3.0, and later releases, are designed to use bases (see Base snaps) and Multipass to both simplify the build process and to confine the build environment within a virtual machine. Confining the build in this way isolates potentially conflicting libraries and other files from your host system, and vice-versa.
However, Snapcraft offers a variety of options alongside Multipass, such as building within an ephemeral environment or with LXD. See Build options for further details.
Creating snapcraft.yaml
The typical snap build process centres on iterating over the configuration of parts, plugins and interfaces within this snapcraft.yaml file:
The following lists how you might want to approach building a new snap for your application with snapcraft.yaml:
Building your snap
Critically, you can update snapcraft.yaml outside of the build environment and run snapcraft within the build environment to incorporate any external changes and continue with the build. If there are no further errors, your snap will be built.
See Debugging building snaps for common problems and their solutions.
With Multipass, the default virtual machine is assigned 2 CPUs. If you have the hardware capabilities, use the following environment variables to modify CPU and memory allocation to improve performance:
If you don’t have Multipass installed, snapcraft will first prompt for its automatic installation via a snap. If you can’t use Multipass, see Build options for alternatives.
The build process will proceed through the Snapcraft lifecycle, installing and building your project’s dependencies, as described by your snapcraft.yaml. The time this takes will depend on the complexity of your project and the capabilities of your system.
For a more comprehensive and iterative break-down of the snap building process, see Creating a snap.
ⓘ To see what’s new in each release of Snapcraft, take a look at Snapcraft release notes.
Last updated 6 months ago.
© 2021 Canonical Ltd.
Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Powered by Charmed Kubernetes
Snap documentation
Welcome to the home of snap, snapd, and snapcraft documentation.
Snaps are app packages for desktop, cloud and IoT that are easy to install, secure, cross-platform and dependency-free.
Discovering snap:
Getting started | Discover how snaps are used, installed, updated, removed and managed |
Installing snap | Step-by-step installation instructions for all major Linux distributions, from Arch to Zorin |
Channels | Get the latest stable releases of your favourite software, or run cutting edge versions |
Advanced features:
Managing updates | Snaps update automatically, but you can also manually control when and how often |
Snapshots | Save, backup and restore the state of one or more installed snaps |
Parallel installs | Install more than one version of the same snap on your system |
Building your own snaps:
Snapcraft overview | Learn how to Install snapcraft and build your first snaps |
Creating a snap | Step-by-step guides for Python, Go, Electron, pre-built binaries and more |
The snapcraft format | A comprehensive look at the various values that can be defined within a snap’s build file |
Most of this documentation can be collaboratively discussed and changed on the respective topic in the doc category of the Snapcraft forum. See the documentation guidelines if you’d like to contribute.
Last updated 15 days ago.
© 2021 Canonical Ltd.
Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Powered by Charmed Kubernetes
snapd
Install latest/stable of snapd
Ubuntu 16.04 or later?
View in Desktop store
Make sure snap support is enabled in your Desktop store.
Install using the command line
Daemon and tooling that enable snap packages
Install, configure, refresh and remove snap packages. Snaps are ‘universal’ packages that work across many different Linux systems, enabling secure distribution of the latest apps and utilities for cloud, servers, desktops and the internet of things.
Start with ‘snap list’ to see installed snaps.
Details for snapd
Share this snap
Generate an embeddable card to be shared on external websites.
Create embeddable card
Share embeddable card
Customise your embeddable card using the options below.