GithubHelp home page GithubHelp logo

docker2exe's Introduction

docker2exe

This tool can be used to convert a Docker image to an executable that you can send to your friends!

Installation

Download a binary from the releases page.

$ mv docker2exe-darwin-amd64 docker2exe
$ chmod +x docker2exe
$ ./docker2exe --help

Usage

To create a new binary:

$ docker2exe --name alpine --image alpine:3.9

This will create the following files:

dist
├── alpine-darwin-amd64
├── alpine-linux-amd64
├── alpine-windows-amd64

Now, you can run the executable:

$ dist/alpine-darwin-amd64 cat /etc/alpine-release
3.9.5

When the executable is run, we'll check for the alpine:3.9.5 image on the user's system. If it doesn't exist, the executable will automatically run:

$ docker pull alpine:3.9.5

Embedded Mode

In this mode, if the specified image doesn't exist, we'll attempt to load it from a tarball that is embeddded in the executable.

$ docker2exe --name alpine --image alpine:3.9 --embed

When creating the executable above, the image was dumped to a tarball and baked into the resulting executable:

$ docker save alpine:3.9 | gzip > alpine.tar.gz

When the executable runs, we'll check for the alpine:3.9 image on the user's system. If it doesn't exist, the executable will automatically run:

$ docker load alpine.tar.gz

For small images, this approach works great. In the example above, the resulting executable was under 10MB.

docker2exe's People

Contributors

rzane 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.