Enhance your Docker usage: Launch build containers with Floki

Share

Our readers predicted that containers would be the dominant technology in 2019 (overtaking popular tech such as serverless, TensorFlow, and Kotlin). As container usage continues to grow, more containers mean more tools in the ecosystem and more choices about which to adopt. We scanned the seas and found Floki: a tool for helping users configure interactive build containers.

This open-source tool, according to its GitHub repo, “aims to improve the human interface for launching and using interactive Docker containers”. This project is still fairly new to the scene; the latest release is version 0.1.0.

Welcome Floki aboard and let us see what its goals and uses are.

SEE ALSO: Meet Osaka, a Rust async for explicit, well-defined code that doesn’t take up too much space

Features and usage

What does Floki do? From the README:

Instead of remembering or constructing complicated docker run commands, or writing custom scripts to launch docker containers, floki lets you specify what you want from your docker container in a configuration file. You can then get your environment just by running floki.

The given advantages of this method are that it becomes easier to use and share and gives projects a consistent, uniform interface.

Floki also has Docker-in-Docker (dind)  support. (Must be enabled/set to true.)

How does this work? According to a Reddit comment about Floki by user rlupton20 on the r/programming sub:

The same as it does in e.g. a gitlab CI pipeline. It launches a docker-in-docker container, links it to the main (interactive) container, and sets the DOCKER_HOST environment variable. It still requires docker command line tools in the interactive container (the image you specify in the config file – although you could install them in the init step).

Other features/details include:

  • Environment forwarding:
    • Capture and forward host user details
    • Forward SSH agent socket into the container
  • Sandboxed commands: Run a single command with floki run
  • Pass additional switches to an underlying Docker command with a subcommand.
  • Configure different shells for different containers
  • Built with Rust

SEE ALSO: Buildah: Build containers fast and easy without Docker

Start sailing

Refer to the full documentation here for more details.

View the getting started guide for installation instructions, prerequisites and how to launch your first floki container.

Usage requires either providing a YAML file in the source code root directory or running floki in a local Dockerfile.

The post Enhance your Docker usage: Launch build containers with Floki appeared first on JAXenter.

Source : JAXenter