Enhance your Docker usage: Launch build containers with Floki
As container usage spreads, the number of tools in the ecosystem grows. Floki is an open source tool aims to help users launch and use interactive Docker containers, without any Docker run commands. It features Docker-in-Docker support and can forward host user information.
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.
Features and usage
What does Floki do? From the README:
Instead of remembering or constructing complicated
docker runcommands, or writing custom scripts to launch docker containers,
flokilets you specify what you want from your docker container in a configuration file. You can then get your environment just by running
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
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_HOSTenvironment 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
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.