Installing in Docker
Tip
This guide shows how to install Bifröst in Docker/Container. If you like to use Bifröst directly on your Host, see its documentation here.
Before we start
Be sure Bifröst is supporting your Docker host, by checking the following matrix:
Cells express support in format of <generic>
/<extended>
. See our documentation of distributions of Bifröst to learn more.
Architecture | linux | windows |
---|---|---|
i386 | / | / |
amd64 | / | / |
armv6 | / | / |
armv7 | / | / |
arm64 | / | / |
mips64le | / | / |
riscv64 | / | / |
In the majority of the cases you might run Linux or Windows on AMD64, which is supported.
Linux
Note
This guide assumes you have a Linux distribution with systemd running. This reflects the majority of all actual distributions, such as Ubuntu, Debian, Fedora, ...
-
Configure Bifröst. For example download the demo configuration and adjust it to your needs (see documentation of configuration for the documentation about it):
1 2 3 4
sudo mkdir -p /etc/engity/bifroest/ sudo curl -sSLf https://raw.githubusercontent.com/engity-com/bifroest/v0.4.0/contrib/configurations/simple-inside-docker.yaml -o /etc/engity/bifroest/configuration.yaml # Adjust it to your needs sudo vi /etc/engity/bifroest/configuration.yaml
-
Enable Bifröst to always run on your system, by downloading our example service configuration:
1 2 3
sudo curl -sSLf https://raw.githubusercontent.com/engity-com/bifroest/v0.4.0/contrib/systemd/bifroest-in-docker.service -o /etc/systemd/system/bifroest.service # Adjust it to your needs sudo vi /etc/systemd/system/bifroest.service
-
Reload the systemd daemon:
1
sudo systemctl daemon-reload
-
Enable and start Bifröst:
1 2
sudo systemctl enable bifroest.service sudo systemctl start bifroest.service
-
If you're using the original demo configuration, Bifröst will print a demo password to its log files while startup. You can receive it with the following command:
1
docker logs bifroest
-
Now you can log in to Bifröst the first time:
1
ssh demo@localhost
Windows
-
Ensure you have a working docker instance installed.
Note
This guide assumes you're running a Linux host of Docker on Docker for Windows (default).
Bifröst also supports Windows Containers (Windows native). You just have to adjust the path below accordingly.
-
Open a Powershell Terminal with Administrator privileges.
-
Configure Bifröst. For example download the demo configuration and adjust it to your needs (see documentation of configuration for the documentation about it):
1 2 3 4
mkdir -Force 'C:\ProgramData\Engity\Bifroest' curl -sSLf https://raw.githubusercontent.com/engity-com/bifroest/v0.4.0/contrib/configurations/simple-inside-docker-windows.yaml -o 'C:\ProgramData\Engity\Bifroest\configuration.yaml' # Adjust it to your needs notepad 'C:\ProgramData\Engity\Bifroest\configuration.yaml'
-
Enable and start Bifröst:
1
docker run -d --restart unless-stopped --name bifroest -p 22:22 -v //var/run/docker.sock:/var/run/docker.sock -v C:\ProgramData\Engity\Bifroest:/etc/engity/bifroest -v C:\ProgramData\Engity\Bifroest:/var/lib/engity/bifroest ghcr.io/engity-com/bifroest:latest run --log.colorMode=always
-
Now you can log in to Bifröst the first time:
1
ssh demo@localhost