-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,71 @@ | ||
# Install Docker | ||
We need Docker with multi-platform image support. Plugin `buildx` is included by default to `docker-desktop`, and available for `docker-ce` and `moby-engine`. | ||
# Running Bee2 within Docker containers | ||
|
||
Debian: | ||
## Install Docker | ||
|
||
We need Docker with support for multi-platform images. This support is provided | ||
by the `buildx` plugin included by default in `docker-desktop` and available | ||
from `docker-ce` and `moby-engine`. | ||
|
||
Install on Debian: | ||
``` | ||
apt install moby-engine moby-buildx moby-compose moby-cli | ||
``` | ||
Ubuntu: | ||
https://docs.docker.com/engine/install/ubuntu/ | ||
|
||
# Prepare Docker to work with multi-platform images | ||
Install on Ubuntu: | ||
[https://docs.docker.com/engine/install/ubuntu/](https://docs.docker.com/engine/install/ubuntu/). | ||
|
||
## Prepare Docker | ||
|
||
First time: | ||
|
||
``` | ||
docker buildx create --name mybuilder | ||
docker buildx use mybuilder | ||
``` | ||
Each time: | ||
|
||
Next times: | ||
``` | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
``` | ||
|
||
# Update images for build | ||
## Update Docker images | ||
|
||
``` | ||
docker buildx bake debian | ||
docker buildx bake fedora | ||
``` | ||
|
||
# Run build and test on the all available platforms | ||
## Build and test Bee2 on all available platforms | ||
|
||
``` | ||
docker buildx bake --progress="plain" bee2d | ||
docker buildx bake --progress="plain" bee2f | ||
``` | ||
|
||
# Run build and test on a one of available platforms | ||
## Build and test Bee2 on a specific platform | ||
|
||
``` | ||
docker buildx build --platform linux/amd64 --progress="plain" -f dockerfiles/bee2d.Dockerfile . | ||
docker buildx build --platform linux/amd64 --progress="plain" -f dockerfiles/bee2f.Dockerfile . | ||
``` | ||
|
||
# Run terminal on specified platform image | ||
## Run a terminal on a specific platform | ||
|
||
``` | ||
docker run --rm -it -v .:/usr/src --platform linux/s390x btls/fedora:cdev bash | ||
``` | ||
|
||
### Turn on experimental features | ||
If option `platform` is unavailable in Docker, you need turn on experimental Docker CLI features in one of two ways. Either by setting an environment variable | ||
## Enable experimental Docker features | ||
|
||
The `platform` option may not be available in Docker. In this case you need | ||
to enable experimental Docker CLI features in one of two ways: | ||
|
||
* set the environment variable `DOCKER_CLI_EXPERIMENTAL` to `enabled`: | ||
``` | ||
$ export DOCKER_CLI_EXPERIMENTAL=enabled | ||
export DOCKER_CLI_EXPERIMENTAL=enabled | ||
``` | ||
or by turning the feature on in the config file $HOME/.docker/config.json: | ||
|
||
* add the following line to the config file `$HOME/.docker/config.json`: | ||
``` | ||
{ | ||
… | ||
"experimental" : "enabled" | ||
} | ||
"experimental" : "enabled" | ||
``` |