Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.
/ packager Public archive

Extract ubuntu packages to standalone docker images

Notifications You must be signed in to change notification settings

khusseini/packager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packager

Create minimal docker images for applications based on Ubuntu packages

Example:

git clone git@github.com:mozzymoz/packager.git
cd packager/
docker build -t packager .
cat examples/nginx.json | docker run --name pckgr -ia stdin -a stdout -a stderr packager > build.tar
cat build.tar | docker import - nginx
docker run -d -p 8080:80 nginx /usr/sbin/nginx -g 'daemon off;'
curl -v http://localhost:8080

The resulting nginx images is less than 50MB small

Configuration:

{
    "pre-commands": [...]        # List of bash commands to execute before build
    "post-commands": [...]       # List of bash commands to execute after build  
    "essentials": [ln, rm, ....] # List of essential binaries, like cp, mv ...
    "packages": [...]            # Apt packages to install
    "bin": [...]                 # Binaries to extract e.g. nginx or /usr/sbin/nginx
}

About

Extract ubuntu packages to standalone docker images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages