| title | Getting Started |
|---|---|
| date | 2019-04-03 23:01:31 +0100 |
| draft | false |
It's recommended you add your user to the docker group:
$ sudo usermod -a -G docker USERNAMEand logout and in again to pick up the changes.
Alternatively you can run floki (after installation) with sudo -E floki.
Precompiled binaries for linux and OSX can be downloaded from the releases page.
For example, to obtain the latest binary with curl and extract it, run
$ curl -L https://github.com/Metaswitch/floki/releases/download/2.2.0/floki-2.2.0-linux.tar.gz | tar xzvf -in a shell. You should now be able to run floki from your working directory:
$ ./floki --version
floki 0.6.1Copy this into your path to run it without needing to specify the path absolutely. E.g.
$ mv floki /usr/local/bin/floki can also be installed directly from cargo.
$ cargo install flokiShell completions can be added to your existing shell session with
source <(floki completion <shell>)See floki completion --help for a list of available <shell>s. Add this command to your shell's rc file to get completions in all new shell sessions.
Enjoy!
floki is configured using a configuration file typically placed in the root of your codebase. As a basic example, write a basic configuration file, and name it floki.yaml.
image: debian:latest
init:
- echo "Welcome to your first floki container!"Now, in the same directory, run
flokiA container will launch with the working directory mounted as your working directory. Verify this by running ls:
$ ls
... floki.yaml ...In general, invoking floki in any child directory of this root directory will launch a container with:
- The directory containing
floki.yamlmounted; - The container shell located in the guest directory corresponding to the child.
You can use a different configuration file with floki by telling it to use a different file from the command line. For example, if you have another configuration in config.yaml, you can run floki with
floki -c config.yamlNote that, in contrast to invoking floki without the -c flag, this will always mount the current working directory.
- Forwarding of
ssh-agent(useful for authenticating with remote private git servers to pull private dependencies) - Docker-in-docker support
- Forwarding of host user information (allows non-root users to be added and used).
flokivolumes for setting up cross-session build caches.