Skip to main content

Tutorials

The goal of these tutorials is to guide you through the process of building BatchX images, so you can learn the fundamentals to start building and running your own ones.

Requirements

Before starting the tutorials in this section, please make sure your system fulfills these requirements:

1) BatchX

BatchX CLI must be installed in your system.

Use this command to verify you have access to BatchX. A successful configuration should return your user info, similar to the one below.

$ bx whoami
id: "michael-jordan"
email: "michael-jordan@example.com"
ts_creation: 1571914584629

2) Docker

Docker is installed and correctly configured in your system. First, use this command to check Docker is installed.

$ docker --version
Docker version 19.03.4, build 9013bf583a

If the output returns a message similar to the one above you are OK. If you get an error with the message docker: command not found follow the installing instructions described in the Install Docker section.

Once you have Docker installed, run this command to check Docker is properly configured and your user has been included in the local Docker Unix group.

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

If you obtained an output similar to the one above you are all set. If you obtained a permission error, follow the Docker configuration instructions described here.

3) Docker Image Registry

At this moment Docker images can only be imported into BatchX from a Docker image registry, that is, they cannot be imported directly from your local system.

If you don't own any Docker registry account, you can create one for free in Docker Hub.

Once you have created a Docker Hub account login using the docker login command from your command line. You will be prompted to introduce your username and password. If everything was set correctly you should see something similar to this:

$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: michael-jordan
Password:
WARNING! Your password will be stored unencrypted in /home/mj/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
caution

A free Docker Hub account will allow you to store unlimited public repositories and one private repository.
Don't push your images to a public repository if you don't want to expose their internals to others.

Now, you are ready to start these tutorials.