Giter VIP home page Giter VIP logo

docker-companion's Introduction

docker-companion Build Status

docker-companion is a candy mix of tools for docker written in Golang and directly using Docker API calls. As for now it allows to squash and unpack an image.

Reinventing the wheel?

Problem arises with current tools to squash/unpack images since mostly of them are scripted. I personally needed a static implementation with no-deps hell that i could use in my CI pipeline easily (and also to get the job done).

Download and unpack image

Note: Doesn't require a docker daemon running on the host.

docker-companion download my-awesome-image /unpacked_rootfs

Downloads and reconstruct all the image layers, unpacking the content to the directory given as second argument.

Squash an image

The resulting image will loose metadata, but it is handy to reduce image size:

docker-companion squash my-awesome-image my-awesome-image-squashed

You can also make it pull before squashing it:

docker-companion --pull squash my-awesome-image my-awesome-image-squashed:mytag

Or just squashing an image

docker-companion squash my-awesome-image

to directly remove the intermediary (the source image, which will loose the tag)

docker-companion squash --remove my-awesome-image

Unpack an image

docker-companion unpack my-awesome-image /my/path

The path must be absolute, and you must run it with root permission to keep file permissions.

You can squash the image right before unpacking it too:

docker-companion --pull unpack --squash my-awesome-image /my/path

It can be handy sometimes to squash the image before unpacking it (very few cases where the latter fails)

You can supply also the --fatal global option to treat all warnings as fatal:

docker-companion --fatal --pull unpack --squash my-awesome-image /my/path

Get Latest release from github for amd64

curl -s https://api.github.com/repos/mudler/docker-companion/releases/latest \
| grep "browser_download_url.*amd64" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -i - -O docker-companion

docker-companion's People

Contributors

geaaru avatar monstermunchkin avatar mudler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-companion's Issues

iso sqash image to docker ?

iso squash unpack /tmp/chroot & repack push ? or lxc/lxd builder from chroot
ie ?Somepath?/arm64 > Dockersqash push to Dockerhub

also be nice to run from a container to do thus the same on Chroot.
https://quay.io/repository/necrose99/gentoo_arm64_chroot ,
https://quay.io/repository/necrose99/gentoo_arm64 likely need to define the entry-point ie proot ..etc

its none to far yet but if I had a script that would listen to github/sabayon , pentoo gentoo or the like
least push to a contributor repo some arm-64 packages.. I've built a few on my windows box
can then pull in binpkgs to add equo entropy on builds , see what we get.

also for builder to update and push squash image every so often , right now its armchar reserch but , trying to boost quality of what I can , granted i know Gentoo experimental arm image is a touch stale.
so far its a frustrating level of tinkering,

however other than tools and scripts namily ... (https://wiki.gentoo.org/wiki//etc/portage/repos.conf)
layman is often not included on images by default arm64 image is a bit STALE.
going to swap to a tarball soon , as tying to deploy some of them via buuild script for docerhub is less patient , quay.io however will build. give logins etc.

also if possible a cross arm64 out of some of the tools , if i had a repo out , I could least output generic arm64 packages. to scr contrib. , granted they might not have full q/a but for researching and testing
least having core packages built ie entropy equo , etc might be of use. sabayon -devkit
just with calverium thunder-x servers 2200-2800 each for barebones , 300+ cores will be a min till I can buy one. jobs good , but this travel thing and hotel fees killing it... else i might of had it to send 1 ...

if i pay quay for it I can run a few docker workloads etc. , Ideally I could have it run a few arm64 integration testing for sabayon.org via the slowly improved emulation.

{I live in Texas now , so if the AC fails , your server rack might not .... can dynamically do heat management in a crisis "core walking" on/off rumor has it.... , doing lots of security tool testing , new ebuild (robot to pull/push repo repoman fix & push a plus) so setting up some sort of crude Q/A CI pipe line been on my table , lower power the better. able to withstand 145 F+ like 70C + and not fry also good.
able to fail over vpn services and remote connectivity etc , if the primary xenon racks have to go down , also been on design list. }

https://www.runabove.com/armcloud.xml
http://www.eteknix.com/nvidia-announces-tesla-gpus-with-arm64-cpu-onboard/
http://www.newegg.com/Product/Product.aspx?Item=N82E16813190006
https://www.raspberrypi.org/products/raspberry-pi-3-model-b/

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.