gearboxworks/imagemagick

By gearboxworks

Updated almost 5 years ago

Image

81

Gearbox

imagemagick Docker container service for Gearbox

This is the repository for the imagemagick Docker container implemented for Gearbox.

Repository Info

GitHub commit: commit-date

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

Supported versions and respective Dockerfiles

ServiceGitHub VersionDocker VersionDocker SizeDocker Tags
imagemagickimagemagickDocker Version)Docker Size(6.9.10, 6.9)
imagemagickimagemagickDocker Version)Docker Size(7.0.9, 7.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 three methods:

Method 1: Using 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:

  • Allows control over Gearbox Docker containers: stop, start, create, remove.
  • Build, update, modify and release Docker images.
  • Acts as a proxy for interactive commands within a Gearbox Docker container.

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.

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

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 imagemagick Gearbox container.

./launch install imagemagick

Create, and start the imagemagick Gearbox container. Run a shell.

./launch shell imagemagick

Create, and start the imagemagick Gearbox container with version 6.9.10 and run a shell.

./launch shell imagemagick:6.9.10

./launch shell imagemagick:6.9.10 ls -l

./launch shell imagemagick:6.9.10 ps -eaf

Available commands

If imagemagick is symlinked to launch, then the Gearbox container will be determined automatically and the default command will be run. All available commands for a Gearbox container will be automatically symlinked upon installation.

./imagemagick

Running imagemagick Gearbox container default command. If a container has a default interactive command, arguments can be supplied without specifying that command.

./imagemagick -flag1 -flag2 variable

./launch imagemagick:6.9.10 -flag1 -flag2 variable

Gearbox containers may have multiple executables that can be run. The imagemagick Gearbox container has the following available commands:

  • Magick++-config - will execute /usr/bin/Magick++-config within the container.
  • MagickCore-config - will execute /usr/bin/MagickCore-config within the container.
  • MagickWand-config - will execute /usr/bin/MagickWand-config within the container.
  • animate - will execute /usr/bin/animate within the container.
  • compare - will execute /usr/bin/compare within the container.
  • composite - will execute /usr/bin/composite within the container.
  • conjure - will execute /usr/bin/conjure within the container.
  • convert - will execute /usr/bin/convert within the container.
  • The default command will execute /usr/bin/magick within the container.
  • display - will execute /usr/bin/display within the container.
  • identify - will execute /usr/bin/identify within the container.
  • import - will execute /usr/bin/import within the container.
  • magick - will execute /usr/bin/magick within the container.
  • magick-script - will execute /usr/bin/magick-script within the container.
  • mogrify - will execute /usr/bin/mogrify within the container.
  • montage - will execute /usr/bin/montage within the container.
  • stream - will execute /usr/bin/stream within the container.
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.

./launch list imagemagick

Method 2: GitHub repo

Setup from GitHub repo

Simply clone this repository to your local machine

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

Building from GitHub repo

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.

Method 3: Docker Hub

Setup from Docker Hub

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

Starting

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

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

Stopping

stop - Stop a Docker container.

docker stop imagemagick-latest

Remove container

rm - Remove the Docker container.

docker container rm imagemagick-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 imagemagick-latest --network gearboxnet gearbox/imagemagick:latest

Run a shell

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

docker run --rm --name imagemagick-latest -i -t --network gearboxnet gearbox/imagemagick: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 imagemagick-latest 22/tcp | sed 's/0.0.0.0://')"
ssh -p ${SSH_PORT} -o StrictHostKeyChecking=no gearbox@localhost

Docker Pull Command

docker pull gearboxworks/imagemagick