gearboxworks/metagraphics

By gearboxworks

Updated almost 5 years ago

Image

55

Gearbox

Meta Graphics Docker container service for Gearbox

This is the repository for the Meta Graphics) Docker container implemented for Gearbox.

Common graphics utilities and apps.

This Gear provides all available graphics related tools and utilities found within common Linux distributions.

See below for all currently supported Linux distros.

Repository Info

GitHub commit: commit-date

GitHub release(latest): last-release-datelast-release-daterelease-state

Supported versions and respective Dockerfiles

Service WebsiteGear NameLatest GitHub VersionLatest Docker VersionDocker SizeDocker Tags
Meta Graphicsgearbox.jsonmetagraphicsDocker VersionDocker Size(1.0.0, 1.0, latest)

About this container.

A driving force behind Gearbox is to improve the user experience using software, and especially for software developers.

Our vision is to empower developers and other software users to quickly and easily use almost any version of a software service, command line tool or API without without first getting bogged down with installation and configuration.

In other words, our vision for Gearbox users is that software "just works".

Using this container.

This container has been designed to work within the Gearbox framework. However, due to the flexability of Gearbox, it can be used outside of this framework.

There are two methods:


Method 1: Using Gearbox launch

launch is a tool specifically designed to interact with a Gearbox Docker container.

It provides three important functional areas, without any Docker container learning curve:

  • Install, uninstall services and applications as though it was native. (Even multiple versions!)
  • Complete integration with Gearbox container commands with the host PC. (Environment and filesystem.)
  • Allows control over Gearbox containers: stop, start, create, remove.
  • Build, update, modify and release Gearbox images.
  • The Gearbox container doesn't even have to be local. (Great for team development.)

It also provides a functional SSH daemon for connecting remotely as well as a standard set of common tools and utilities.

Further launch documentation can be found here.

Installing launch

launch is currently in beta testing and is included along with all Gearbox Docker repos. Once out of beta, it will be included within the Gearbox installation package.

For now, simply download the standalone launch binary for your O/S.

This executable can be placed anywhere on your filesystem that is within your PATH environment variable. (This is usually /usr/local/bin)

It's suggested to copy this binary to it's own directory and this to your PATH.

mkdir -p /usr/local/gearbox/bin
cp ./launch /usr/local/gearbox/bin
chmod a+x /usr/local/gearbox/bin/launch
echo 'PATH="/usr/local/gearbox/bin:${PATH}"' >> ~/.profile
Running launch

There are many ways to call launch, either directly or indirectly. Additionally, all host environment variables will be imported into the container seamlessly. This allows a devloper to try multiple versions of software as though they were installed locally.

If a container is missing, it will be downloaded and created. Multiple versions can co-exist.

Install, create, and start the latest version of metagraphicsGearbox container.

./bin/launch install metagraphics

me@home:~ % ./bin/launch shell metagraphics
Gearbox: Installing Gear 'metagraphics:latest'.
Gearbox: Downloading Gear 'metagraphics:latest'.
Gearbox: Pulling Gear metagraphics:latest.
Gearbox: [==================================================>]  141.6MB/141.6MB
Gearbox: Pulling Gear metagraphics:latest - OK.
Gearbox: Installed Gear 'metagraphics:latest' OK.
me@home:~ 

Install, create, and start the latest version of metagraphicsGearbox container. Run a shell.

./bin/launch shell metagraphics

me@home:~ % ./bin/launch shell metagraphics
Gearbox: Installing Gear 'metagraphics:latest'.
Gearbox: Downloading Gear 'metagraphics:latest'.
Gearbox: Pulling Gear metagraphics:latest.
Gearbox: [==================================================>]  141.6MB/141.6MB
Gearbox: Pulling Gear metagraphics:latest - OK.
Gearbox: Installed Gear 'metagraphics:latest' OK.
Gearbox: Starting gear 'metagraphics:latest':
Gearbox: Gear 'metagraphics:latest' started OK
[metagraphics:1.0.0] ~ $ 

Create, and start version 1.0.0 of the metagraphicsGearbox container and run a shell with commands.

./bin/launch shell metagraphics:1.0.0 ls -l

me@home:~ % ./bin/launch shell metagraphics:1.0.0 ls -l
Gearbox: Gear 'metagraphics:1.0.0' already started.
total 60
-rw-r--r--    1 gearbox  gearbox       5864 May 24 02:25 Makefile
-rw-r--r--    1 gearbox  gearbox      18757 May 24 02:25 README.md
drwxr-xr-x    1 gearbox  gearbox        374 May 24 02:25 TEMPLATE
drwxr-xr-x    1 gearbox  gearbox       1224 May  9 05:48 bin
drwxr-xr-x    1 gearbox  gearbox        238 May 22 01:33 build
-rw-r--r--    1 gearbox  gearbox       2196 May 22 01:35 files
-rw-r--r--    1 gearbox  gearbox       5313 May 24 01:34 gearbox.json
-rw-r--r--    1 gearbox  gearbox        596 May 22 01:27 packages
drwxr-xr-x    1 gearbox  gearbox        136 May 22 01:40 versions
me@home:~ % 

./bin/launch shell metagraphics:1.0.0 ps -eaf

me@home:~ % ./bin/launch shell metagraphics:1.0.0 ps -eaf
Gearbox: Gear 'metagraphics:1.0.0' already started.
PID   USER     TIME  COMMAND
    1 root      0:00 /bin/s6-svscan /etc/gearbox/services
   16 root      0:00 s6-supervise GearShift
   17 root      0:00 s6-supervise sshd
   18 root      0:00 s6-supervise metagraphics
   19 root      0:00 {GearboxGearshif} /bin/bash /usr/local/sbin/GearboxGearshift
   20 root      0:00 /usr/sbin/sshd -D -e
 3342 root      0:00 sshd: gearbox [priv]
 3344 gearbox   0:00 sshd: gearbox@notty
 3345 gearbox   0:00 ps -eaf
me@home:~ % 

Provide information on the installed Gearbox container.

./bin/launch list metagraphics

me@home:~ % ./bin/launch list metagraphics
Downloaded Gearbox images: 1 found
+----------+----------------------------------+-------+--------+
| CLASS    | IMAGE                            | PORTS | SIZE   |
+----------+----------------------------------+-------+--------+
| graphics | gearboxworks/metagraphics:1.0.0  |       |  40 MB |
+----------+----------------------------------+-------+--------+

Installed Gearbox gears: 1 found
+---------------------+----------+---------+----------------------------------+-------+----------+---------------+--------+--------+
| NAME                | CLASS    | STATE   | IMAGE                            | PORTS | SSH PORT | IP ADDRESS    | MOUNTS | SIZE   |
+---------------------+----------+---------+----------------------------------+-------+----------+---------------+--------+--------+
| metagraphics-1.0.0  | graphics | created | gearboxworks/metagraphics:1.0.0  |       |          | (gearboxnet)  |        |  40 MB |
|                     |          |         |                                  |       |          |               |        |        |
+---------------------+----------+---------+----------------------------------+-------+----------+---------------+--------+--------+


Configured Gearbox networks:
+------------+--------+---------------+
| NAME       | DRIVER | SUBNET        |
+------------+--------+---------------+
| gearboxnet | bridge | 172.42.0.0/24 |
+------------+--------+---------------+

Gearbox container command integration

When a Gearbox container is installed - specified commands, (as defined by the gearbox.json file), will be symlinked to the ./bin/launch executable.

This allows for seamless integration of a Gearbox container's commands with the host machine.

Gearbox containers may have many executables. Additionally if metagraphics is also symlinked to ./bin/launch, it will run the default command defined with the the container. No need to specify that command as in the shell example above.

./metagraphics

./metagraphics -flag1 -flag2 variable1 variable2 variable3

./bin/launch run metagraphics:1.0.0 -flag1 -flag2 variable1 variable2 variable3

./default -flag1 -flag2

./mm2gv

./dotty -flag1 variable1 variable2 variable3

Available commands

The metagraphicsGearbox container has no defined commands within the gearbox.json file. The metagraphicsGearbox container has the following 128 available commands:

Host Executable NameGearbox Container Executable Name
Magick++-config/usr/bin/Magick++-config
MagickCore-config/usr/bin/MagickCore-config
MagickWand-config/usr/bin/MagickWand-config
acyclic/usr/bin/acyclic
animate/usr/bin/animate
annotate/usr/bin/annotate
bcomps/usr/bin/bcomps
ccomps/usr/bin/ccomps
circo/usr/bin/circo
cjpeg/usr/bin/cjpeg
cluster/usr/bin/cluster
compare/usr/bin/compare
composite/usr/bin/composite
conjure/usr/bin/conjure
convert/usr/bin/convert
corepdf/usr/bin/corepdf
cwebp/usr/bin/cwebp
default/usr/bin/magick
diff-pdf/usr/bin/diff-pdf
dijkstra/usr/bin/dijkstra
display/usr/bin/display
djpeg/usr/bin/djpeg
dot/usr/bin/dot
dot2gxl/usr/bin/dot2gxl
dot_builtins/usr/bin/dot_builtins
dotty/usr/bin/dotty
dwebp/usr/bin/dwebp
edgepaint/usr/bin/edgepaint
exiftool/usr/bin/exiftool
exiftran/usr/bin/exiftran
fax2ps/usr/bin/fax2ps
fax2tiff/usr/bin/fax2tiff
fdp/usr/bin/fdp
fix-qdf/usr/bin/fix-qdf
gc/usr/bin/gc
gd2copypal/usr/bin/gd2copypal
gd2togif/usr/bin/gd2togif
gd2topng/usr/bin/gd2topng
gdcmpgif/usr/bin/gdcmpgif
gdparttopng/usr/bin/gdparttopng
gdtopng/usr/bin/gdtopng
gif2rgb/usr/bin/gif2rgb
gif2webp/usr/bin/gif2webp
gifbuild/usr/bin/gifbuild
gifclrmp/usr/bin/gifclrmp
gifdiff/usr/bin/gifdiff
giffix/usr/bin/giffix
gifsicle/usr/bin/gifsicle
giftext/usr/bin/giftext
giftogd2/usr/bin/giftogd2
giftool/usr/bin/giftool
gifview/usr/bin/gifview
gm/usr/bin/gm
gml2gv/usr/bin/gml2gv
gnuplot/usr/bin/gnuplot
graphml2gv/usr/bin/graphml2gv
gv2gml/usr/bin/gv2gml
gv2gxl/usr/bin/gv2gxl
gvcolor/usr/bin/gvcolor
gvgen/usr/bin/gvgen
gvmap/usr/bin/gvmap
gvmap.sh/usr/bin/gvmap.sh
gvpack/usr/bin/gvpack
gvpr/usr/bin/gvpr
gxl2dot/usr/bin/gxl2dot
gxl2gv/usr/bin/gxl2gv
identify/usr/bin/identify
img2webp/usr/bin/img2webp
import/usr/bin/import
jpegoptim/usr/bin/jpegoptim
jpegtran/usr/bin/jpegtran
lefty/usr/bin/lefty
lneato/usr/bin/lneato
magick/usr/bin/magick
magick-script/usr/bin/magick-script
mm2gv/usr/bin/mm2gv
mogrify/usr/bin/mogrify
montage/usr/bin/montage
muraster/usr/bin/muraster
mutool/usr/bin/mutool
neato/usr/bin/neato
nop/usr/bin/nop
opj_compress/usr/bin/opj_compress
opj_decompress/usr/bin/opj_decompress
opj_dump/usr/bin/opj_dump
optipng/usr/bin/optipng
osage/usr/bin/osage
pal2rgb/usr/bin/pal2rgb
patchwork/usr/bin/patchwork
pdfgrep/usr/bin/pdfgrep
png-fix-itxt/usr/bin/png-fix-itxt
pngcrush/usr/bin/pngcrush
pngfix/usr/bin/pngfix
pngquant/usr/bin/pngquant
pngtogd/usr/bin/pngtogd
pngtogd2/usr/bin/pngtogd2
ppm2tiff/usr/bin/ppm2tiff
prune/usr/bin/prune
qpdf/usr/bin/qpdf
raw2tiff/usr/bin/raw2tiff
rdjpgcom/usr/bin/rdjpgcom
sccmap/usr/bin/sccmap
sfdp/usr/bin/sfdp
stream/usr/bin/stream
tiff2bw/usr/bin/tiff2bw
tiff2pdf/usr/bin/tiff2pdf
tiff2ps/usr/bin/tiff2ps
tiff2rgba/usr/bin/tiff2rgba
tiffcmp/usr/bin/tiffcmp
tiffcp/usr/bin/tiffcp
tiffcrop/usr/bin/tiffcrop
tiffdither/usr/bin/tiffdither
tiffdump/usr/bin/tiffdump
tiffinfo/usr/bin/tiffinfo
tiffmedian/usr/bin/tiffmedian
tiffset/usr/bin/tiffset
tiffsplit/usr/bin/tiffsplit
tjbench/usr/bin/tjbench
tred/usr/bin/tred
twopi/usr/bin/twopi
unflatten/usr/bin/unflatten
vimdot/usr/bin/vimdot
webpinfo/usr/bin/webpinfo
webpmux/usr/bin/webpmux
webpng/usr/bin/webpng
wrjpgcom/usr/bin/wrjpgcom
xpdf/usr/bin/xpdf
zlib-flate/usr/bin/zlib-flate
Remote connection

ssh - All Gearbox containers have a running SSH daemon. So you can connect remotely. To show what ports are exported to the host, use the following command.

./bin/launch list metagraphics

Method 2: Docker Hub

It is strongly suggested to use Gearboxlaunch as everything is done for you. However, you can still work with a Gearbox Gears as though it's a normal Docker container.

Setup from Docker Hub

A simple docker pull gearbox/metagraphics will pull down the latest version.

Starting

start - Spin up a Docker container with the correct runtime configs.

docker run -d --name metagraphics-latest --restart unless-stopped --network gearboxnet gearbox/metagraphics:latest

Stopping

stop - Stop a Docker container.

docker stop metagraphics-latest

Remove container

rm - Remove the Docker container.

docker container rm metagraphics-latest

Run in foreground

run - Run a Docker container in the foreground, (all STDOUT and STDERR will go to console). The Container be removed on termination.

docker run --rm --name metagraphics-latest --network gearboxnet gearbox/metagraphics:latest

Run a shell

shell - Run a shell, (/bin/bash), within a Docker container.

docker run --rm --name metagraphics-latest -i -t --network gearboxnet gearbox/metagraphics:latest /bin/bash

SSH

ssh - All Gearbox containers have a running SSH daemon. So you can connect remotely.

Either use launch above or discover the port and SSH directly.

SSH_PORT="$(docker port metagraphics-latest 22/tcp | sed 's/0.0.0.0://')"
ssh -p ${SSH_PORT} -o StrictHostKeyChecking=no gearbox@localhost

Building from this GitHub repo.

Setup from GitHub repo

Simply clone this repository to your local machine

git clone https://github.com/gearboxworks/docker-metagraphics.git

Makefile targets

make build - Build Docker images. Build all versions from the base directory or specific versions from each directory.

make list - List already built Docker images. List all versions from the base directory or specific versions from each directory.

make clean - Remove already built Docker images. Remove all versions from the base directory or specific versions from each directory.

make push - Push already built Docker images to Docker Hub, (only for Gearbox admins). Push all versions from the base directory or specific versions from each directory.

Runtime from GitHub repo

You can either build your container as above, or use it from DockerHub with these commands:

make start - Spin up a Docker container with the correct runtime configs.

make stop - Stop a Docker container.

make run - Run a Docker container in the foreground, (all STDOUT and STDERR will go to console). The Container be removed on termination.

make shell - Run a shell, (/bin/bash), within a Docker container.

make rm - Remove the Docker container.

make test - Will issue a stop, rm, clean, build, create and start on a Docker container.


Note: This README was generated by JsonToConfig - Created on 2020-05-24T15:08:07+1000, using template:README.md.tmpl and json:gearbox.json

Docker Pull Command

docker pull gearboxworks/metagraphics