Docker registry¶
Flou uses docker and it's hub as the preferred way to develop and deploy Flou apps. Here are the process and options to build, test and deploy Flou's docker images.
Running the images from the local Flou repo¶
You need to override the default compose.yml
so that it builds the
images from the local source code instead of pulling them from the registry:
Building and deploying the images¶
To build, tag and push the images use:
% docker compose -f compose.yml -f compose.dev.yml build
% docker tag flou-engine:latest flouai/flou:latest
% docker tag flou-studio:latest flouai/studio:latest
% docker tag flou-docs:latest flouai/docs:latest
% docker push flouai/flou:latest
% docker push flouai/studio:latest
% docker push flouai/docs:latest
Creating a local docker registry for testing¶
Creating a local docker registry can be useful for testing release procedures.
We will be following this guide to set up the local registry using docker.
Set up your local docker registry¶
First start your docker daemon and then run:
If you need to see the logs:
If you want a nice UI to see the registry instead run the compose.yml
defined in this image
adding to registry-server
:
Using the local registry¶
After building the docker image use the following instructions to tag, push and pull from the local repository.
% docker compose -f compose.yml -f compose.dev.yml build
% docker tag flou-engine:latest localhost:5001/flouai/flou:latest
% docker push localhost:5001/flouai/flou:latest
% docker pull localhost:5001/flouai/flou
The same can be done for the studio changing engine
for studio
or docs
.
% docker tag flou-engine:latest localhost:5001/flouai/flou:latest
% docker tag flou-studio:latest localhost:5001/flouai/studio:latest
% docker tag flou-docs:latest localhost:5001/flouai/docs:latest
% docker push localhost:5001/flouai/flou:latest
% docker push localhost:5001/flouai/studio:latest
% docker push localhost:5001/flouai/docs:latest
To the use this images in flou compose
add the REGISTRY
envvar to point to
the local registry:
This overrides the default
compose.yml
file by changing thebuild
property to animage
pointing to the local registry and adding local volumes for developing.