Docker is convenient to use as a ready-made container that contains the entire ecosystem for developing a server and services on it.
This page describes how to prepare and assemble a basic docker image
The script scripts/docker/prepare_image.sh prepares the directory to build the docker image. It downloads some repositories from github and manages their dependencies.
To change the version of the library in docker provide that version from command line.: AMQP_VERSION=v4.3.17 ./prepare_image.sh
See full list of variables in scripts/docker/prepare_image.sh
After successful execution of the script, you need to assemble the docker image with the command
where userver_docker_tag
should be replaced with the full path to the package, if you want to upload the image to external storage, for example ghcr.io/userver-framework/ubuntu-userver-build-base:v1
.
In the file docker-compose.yml specify your image in the container you want to work with or create a new one
You can work with userver
via docker
using docker-compose
, more_detailed here