Table of contents
Foreword
It is now time to create the local Docker containers
Installation
Local Docker repository
Start your own local Docker repository with the following command:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
You can change the port number. If you do, please update the Configuration.conf files accordingly (see Secure Backend - Configuration)
Build and run
Version 1.0.x
Go to the SAMDistImages directory and run the following commands:
make images make pushtorepository
Go to the SAMDeployment directory and run the following commands:
make initstorage make initdatabase make images
Still in the SAMDeployment directory, simple run the followoing command:
make run
Version 1.1.x
Go to the SAMDistImages directory and run the following command:
make install
Update
Version 1.0.x
This method only works when there is no database table format or element update between 2 versions.
Assuming there is a folder called secbkd-1.0.x on the server (the currently running version) and that the new package (secbkd-1.0.y) is already present on the same path.
e.g.:
<some_directory>/ |_ secbkd-1.0.x/ |_ secbkd-1.0.10.4/
Stop all running containers and remove them:
docker stop samserver_1.0.x samphpmyadmin_1.0.x samdatabase_1.0.x docker rm samserver_1.0.x samphpmyadmin_1.0.x samdatabase_1.0.x
If you can, clean the docker registry:
docker system prune
Careful, if you have other containers running, you need to delete them manually, this command will remove all existing containers and networks.
Go to the new package and build the images:
cd secbkd-1.0.y/SAMDistImages make images && make pushtorepository
Copy the old 'Storage' dir into the new package (we are still in SAMDistImages directory)
sudo cp -R ../../secbkd-1.0.x/SAMDeployment/Storage ../SAMDeployment/
Run the new containers:
cd ../SAMDeployment make run
And that should do the trick.