GithubHelp home page GithubHelp logo

classicvalues / docker-snap-usage-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anonymouse64/docker-snap-usage-example

0.0 1.0 0.0 2 KB

example snap to use docker snap from another snap

Shell 100.00%

docker-snap-usage-example's Introduction

Example strictly confined snap that uses docker

This is an example snap that uses the docker snap to provide the docker executables and the docker snap.

Building

You will need to build it locally, as it is not published in the store. First install snapcraft:

$ snap install snapcraft

(note it will ask you to acknowledge you are installing a classic snap with the --classic option)

Then clone this repo and just run:

$ snapcraft

Installing and using

After the snap is built, install it with --dangerous:

$ snap install --dangerous docker-snap-usage-example_0.1_amd64.snap

Trying to run it without doing anything else will fail because we need to connect interfaces manually:

$ docker-snap-usage-example.docker 
the docker-executables content interface must be connected first!
please run "snap connect docker-snap-usage-example:docker-executables docker:docker-executables"
$ snap connect docker-snap-usage-example:docker-executables docker:docker-executables
$ docker-snap-usage-example.docker run hello-world
the docker socket interface must be connected first!
please run "snap connect docker-snap-usage-example:docker docker:docker-daemon"
$ snap connect docker-snap-usage-example:docker docker:docker-daemon
$ docker-snap-usage-example.docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

docker-snap-usage-example's People

Contributors

anonymouse64 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.