Launching on localhost¶
Docker environment¶
The implemented docker environment should work on every machine if Docker is installed (obvious). There are further easy steps to do in order to start playing with docker.
- First step : Install Docker
Docker must be installed on your machine.
For Linux (Ubuntu)
Run these commands in a terminal to install Docker :
sudo apt-get update
If apt-get update does not work, it means that you have a proxy problem. Type this to set the proxy (example with proxy for Innovation network) :
export http_proxy=http://proxypac.si.francetelecom.fr:8080 && export https_proxy=http://proxypac.si.francetelecom.fr:8080
Then :
sudo apt-get install apt-utils apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
These commands allow to add Docker repository to the sources list of APT, now you can install docker typing :
sudo apt-get update
sudo apt-get install docker-ce
Congratulations you've installed Docker and now you can start hacking things :D
For Windows 10
Click here to download Docker for W10
Open the .exe file you've just downloaded and just follow the installation steps.
Then start Docker if it has not started automatically by searching Docker in the Windows search bar.
It will ask you yo enable Hyper-V, do it, your computer will restart and then Docker will launch.
- Second step : Project repo Everything has been done in order to make things easy. You have to define an environment variable which will be useful for the next steps.
To do so, just run this command in a terminal or CMD :
export PROJECT_REPO=registry.forge.orange-labs.fr/<YOUR_CUID>/5glab
You shall replace
If you want to build from the initial repo, you should type :
export PROJECT_REPO=registry.forge.orange-labs.fr/lucy/eb/5glab
- Third step : Login to the registry (ONLY ON LOCALHOST)
If you want to launch the containers on your machine, you must connect to the Gitlab registry in order to pull the images.
Just run :
docker login registry.forge.orange-labs.fr
Username will appear, you need to type your cuid in lowercase and press
Be sure to have the last version of the project
Navigate to the docker directory of the project under src with your terminal or CMD.
cd 5glab/src
And just type :
docker-compose up -d
Docker will pull the images and create containers.
To start Swagger, go into your favourite browser and type :
localhost:80