FeG Docker Setup
The FeG runs each service in its own Docker container.
Production services are defined in
Development services are defined in
test service is used to run unit tests and regenerate Swagger/Protobuf code.
test service can also be used to perform other development-related procedures.
To run the FeG with docker, both docker and docker compose must be installed.
- Follow these steps to install docker
- Follow these steps to install docker compose
NOTE: If you are running the FeG on Mac, you will need to increase the memory
limit of the docker daemon to at least 4GB to build the images. Otherwise,
when building the Go image, you may see an error message similar to this:
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed.
rootCA.pem certificate must be located in the
so that it can be mounted into the appropriate containers from there.
Follow these steps to run the FeG services:
docker-compose up -d
Each service should now be running in each of its containers. By default, both production and development services should be running. To place a shell into the test container, run the command:
docker-compose exec test /bin/bash
The test container contains the mounted source code and configuration settings.
The mounted source code and configuration settings can be changed externally
and the changes will be reflected inside the test container.
Run the command
make precommit in the container before submitting a patch.
To make changes to currently running FeG services, the containers must be rebuilt and restarted:
docker-compose up -d
To manage the containers, the following commands are useful:
docker-compose ps(get status of each container)
docker-compose logs -f(tail logs of all containers)
docker-compose logs -f <service name>(tail logs of a particular service)
docker-compose down(stop all services)
Publishing the images
To push production images to a private docker registry, use the following script:
[/magma/feg/gateway/docker]$ ../../../orc8r/tools/docker/publish.sh -r
-i gateway_python [/magma/feg/gateway/docker]$ ../../../orc8r/tools/docker/publish.sh -r -i gateway_go