This page covers docker environment installation

1 Local Docker Env Installation

You are a developer and need a local platform running on docker.

1.1 Prerequisites

Follow installation section #2 common setup

The installation procedure is provided for Linux based environments. For Windows users, we recommend the use Ubuntu through Windows Subsystem for Linux (WSL) as described below.

Compile the requirements

pip install --upgrade pip
pip install pip-tools
./scripts/run_pip_compile.sh

1.1.1 (Optional : Windows users only) WSL and/or Ubuntu installation

  1. Install WSL2 if using Windows

wsl --install --web-download
  1. Install Ubuntu 22.04 LTS

On Windows with WSL2

wsl --install -d Ubuntu-22.04

As an alternative You may use directly Ubuntu 22.04 LTS or an equivalent, in this case you may have to make some changes on you own.

  1. Launch Ubuntu

1.1.2 (Optional : Windows users only) Docker installation on WSL

  • Docker 21.0.4 installed and running with your account (on Ubuntu)

  • Docker compose 2.17.2 installed (on Ubuntu)

  1. Try running “docker” and “docker compose” to see if command is recognized

docker version
docker compose version
docker ps

If this commands are not working fix docker and docker-compose installation before continuing.

1.1.3 Docker installation tips

Recipe for docker installation is https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04 Recipe for docker-compose installation is https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04

A few useful commands :

  • sudo usermod -aG docker ${USER} to add user to docker group

  • sudo service docker start to start docker service

  • sudo service docker status to check docker status

  • If docker sercice stops after a few seconds, check ip tables

sudo update-alternatives --config iptables
 
(choose 1 legacy uptables)
 
sudo service docker stop
sudo service docker start

1.2 Prepare development environment with docker

All the commands below need to be done from the root directory.

  1. Build all docker images

docker compose build

1.3 Start and play with your SoSTrades GUI

Here all commands needed to play with the image built are listed :

  • First start of your local GUI instance

docker compose up

Wait some minutes

Go to http://127.0.0.1:1080 with your web browser and connect with the following credentials :

login : user

password : mdp

  • Stop the instance

docker compose stop
  • Restart the instance

docker compose start
  • Clean the instance (if errors)

docker compose down
  • Start the application with debug mode

docker compose -f docker-compose.debug.yml up

If using VSCode you will find 4 debug profiles :

  • Remote attach main

  • Remote attach message

  • Remote attach post processing

  • Remote attach data

After having launched each debug profile your application should be available on 127.0.0.1:1080 and you will be able to debug it directly running in the container and from VSCode. All debug profiles must be started since flask api are waiting for debug connection to continue. Then without debug connections platform won’t be responding.