Docker

Top  Previous  Next

Installing to a Docker container is experimental as of version 2.5 of RubyEncoder.

 

If you run the project deployment process from within a Docker container and need to install RubyEncoder to the Docker container, please get the RubyEncoder for Linux CLI packages. You may choose one and download from your user profile. Installation packages for Linux are available as tar.gz archive files.

 

The following instruction is expecting you use a terminal for installation. The downloaded installation package may have the following names according to the  version of the encoder:

 

RubyEncoder-3-Evaluation-Linux-x86-CLI.tar.gz

RubyEncoder-3-Linux-x86-CLI.tar.gz

RubyEncoder-3-Evaluation-Linux-x86_64-CLI.tar.gz

RubyEncoder-3-Linux-x86_64-CLI.tar.gz

 

Please follow the instruction below in order to install RubyEncoder to a Docker container and then run it from there for encoding your files as a part of your project deployment process. Note, every installation of RubyEncoder to another machine or another Docker machine still requires an additional license as one license lets you install and use RubyEncoder only on one machine.  

 

All the command below to be run in your Linux host console.

 

1) Download the RubyEncoder for Linux CLI installation package for your platform (x86 or x86_64) from your RubyEncoder user profile. Unpack to the home folder.

 

> cp /your/path/to/downloaded/RubyEncoder-3-Linux-x86_64-CLI.tar.gz /home/username

> cd /home/username

> tar xzf RubyEncoder-3-Linux-x86_64-CLI.tar.gz

 

2) Download a sample docker installation package from our website: http://www.rubyencoder.com/knowledgebase/docker-installation.tar.gz and unpack it to any local folder on your Linux host:

 

> cp /your/path/to/downloaded/docker-installation.tar.gz /home/username/

> cd /home/username

> tar xzf docker-installation.tar.gz

> cd docker-installation

> ls

 

This will show the following directory structure created in /home/username/docker-installation

 

.dockerignore

Dockerfile

README

docker-build.sh

docker-run.sh

entrypoint.sh

rubyencoder <empty folder>

 

3) Copy RubyEncoder encoder binaries to the rubyencoder subfolder within the docker-installation

 

> cp /home/username/rubyencoder*/bin/* /home/username/docker-installation/rubyencoder/

 

 

4) Edit ./entrypoint.sh and specify your RubyEncoder account email and password there

 

> vi entrypoint.sh

 

USERNAME=your@account.com

PASSWORD=yourpassword

 

 

4.1) For Mac users. Edit  ./docker-build.sh and ./docker-run.sh and remove sudo from both commands.

4.2) For Mac users. Run Docker machine if it's not running.

 

>docker-machine start

>eval $(docker-machine env)

 

 

5) Run ./docker-build.sh to build a new docker image

 

6) Run ./docker-run.sh to run the image in the new container. It will register your copy of RubyEncoder and bind it to your Docker. Then it runs RubyEncoder from the Docker container for a test. A list of RubyEncoder CLI encoder options must be shown.

 

7) Add your files, check and edit ./entrypoint.sh again to add the encoding options, run again.

 

Please note, the method above maps your host's /var/run/docker.sock to make it available from within the container. See docker-run.sh. It is safe as you are running the deployment process on your development machine, Docker itself and the containers your are running on it are under your control.

 

If you have any questions, please email us: support@rubyencoder.com