okalachev / img-tool

Utilities for execute commands (amd64 & armhf) & resize the file-images.

Home Page:https://hub.docker.com/r/smirart/img-tool/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

img-tool

Utilities for execute commands (amd64 & armhf) & resize the file-images.

API v0.1

Build image

cd repo-w-instructions
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/img-tool:v0.1
  • Directory repo-w-instructions must consist folder builder with the script image-build.sh. This script will executed in docker-container.
  • Source image may be placed to ./images/. And final image should be placed by same way (path in docker /builder/repo/images).
  • Also you can to transfer variable to docker-image: use -e NAME="VALUE"

Execute in image

cd folder-w-images-dir
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/img-tool:v0.1 /builder/image-chroot.sh <IMAGE> [ exec <SCRIPT> [...] | copy <MOVE_FILE> <MOVE_TO> ]

Resize image

cd folder-w-images-dir
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/img-tool:v0.1 /builder/image-resize.sh <IMAGE> [ min <FREE_SPACE> | max <FREE_SPACE> ]

License

Copyright 2018 Artem B. Smirnov

Licensed under the Apache License, Version 2.0

About

Utilities for execute commands (amd64 & armhf) & resize the file-images.

https://hub.docker.com/r/smirart/img-tool/

License:Apache License 2.0


Languages

Language:Shell 93.7%Language:Dockerfile 6.3%