Bees run in Docker containers, and in some cases, you will be required to write a Dockerfile that you will build and push to your Docker registry running on the Bytewax cluster. Docker is a necessary part of the development and deployment workflow while using Bytewax and this page contains some information to help make it less painful.

Bytewax Docker Images

Bees require the bytewax sdk in order to function properly. We maintain bytewax images that can be used as a base image for your Dockerfiles to be based off of. For a list of the available images, check out the GitHub package registry.

Bytewax Docker Registries

Each Bytewax cluster has its own registry. To get the login credentials, reach out to Bytewax. If you would like to use your own registry, also please contact us.

Multi-Stage Builds

Docker builds and Docker pushes can take a lot of time, this slows down your development cycle and is a total pain! We recommend using multi-stage builds to help with this. Below is an example of a multi-stage build.

FROM as build

COPY ./requirements.txt /

RUN pip install -r requirements.txt

FROM build AS build-deps

COPY . /swarm
WORKDIR /swarm

With this method you can ensure parts of your Docker image that are not changing will be cached and reused.