Install free5gc using docker compose
After installing the prerequisites (docker and gtp5g), we are ready to install and run free5gc containers using Docker Compose.
Docker compose simplifies and automates multi-container application deployment using a single docker compose YAML file that contains all related information about the containers to be deployed. So let's get started.
Clone git repository of free5gc-compose and change directory cd
to free5gc-compose
directory.
git clone https://github.com/free5gc/free5gc-compose.git
cd free5gc-compose
It is recommended to use git checkout
to switch to a specific release version (latest) as there are continuous changes being implemented which might cause some errors during deployment. In the time of writing this article, latest release version is v3.4.2
.
git checkout v3.4.2
If you list the contents of free5gc-compose
directory, you will find a docker-compose.yaml
file which will be used to install and run all free5gc containers. In addition to some other files and directories that we might refer to it later while testing.
Let's now create and run free5gc containers using docker compose. Run the following command inside free5gc-compose
directory.
docker compose up -d
The command output is showing free5gc containers being created and started including:
A database container (mongodb).
5GC network functions containers (UPF, NRF, NSSF, UDM, SMF, AUSF, UDR, AMF, PCF, CHF and N3IWF).
A WebUI container to manage subscribers data via GUI.
UE and RAN simulation containers for testing purposes (UERANSIM and N3IWUE).
Let's ensure that the containers are up and running by running the following command
docker compose ps
And that's it! We have a fully 5G core network running in our machine.
In the next article, we will run our first 5G test ...
Subscribe to my newsletter
Read articles from Lobna Ahmed directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by