Details on docker, configuration and custom images. The default Cowait Dockerfile can be found here.
To use your own custom docker image, simply add a Dockerfile in the root of your project.
cowait build will automatically build your task using your own dockerfile.
Example file structure:
hello-world └── hello.py └── Dockerfile
The easiest way to customize the task image is to extend the default task image. This should be sufficient for most use cases, such as installing extra dependencies or adding files.
# Dockerfile FROM cowait/task RUN echo "Your custom command"
If extending cowait/task is not possible for your use case, you could also create a completely custom docker image. Improvements to this process are planned.
You need to install Cowait in the Dockerfile. In addition there a few things you need to do (you can look at the default Cowait Dockerfile for inspiration):
- Ensure Python 3.6+ is installed
- Install Cowait with
- Create a directory call
/var/taskand set it as
python -Bum cowait.execas entrypoint