Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial is designed to explain docker and what you can do with it.

Table of Contents
Table of Contents
outlinetrue

...

  1. If you haven't already, fire up the system using `docker-compose up d` in `../oms-docker/docker`
  2. Now, from the same directory, use docker-compose down -v
    1. This should shut the system down and remove the container volumes, resetting the data inside the containers
  3. Fire up the system again, this time with `docker-compose up` (without the -d)
    1. This keeps the terminal attached (not detached) to the docker process
      1. Which allows you to see the logs as it is running!
  4. Right click on the terminal and select to open a new terminal
    1. You should now have 2 terminals, both in `oms-docker/docker/`, 1 still running the system, one ready for use.
  5. In the new terminal issue the command `docker-compose logs omscore`
    1. This shows just the logs from the core microservice!
  6. Try running `docker-compose logs` instead
    1. This shows all the logs!
    2. You can even try `docker-compose logs -f` to stay attached to the logs
  7. Execute `docker-compose exec omscore bash`
    1. You are now in a terminal inside the omscore container!
      1. Which is running Ubuntu
    2. You can look at the files and processes running in the container, for example type `ps` in the container to see the processes
    3. Execute the command `php artisan migrate:refresh --seed`
      1. You have just reset the omscore database!
      2. For more core related commands see the usage tips page.
    4. Exit the container by typing exit
      1. You should now be back in your own terminal
  8. Execute `bash ./oms_setup.sh --reset` in `oms-docker/docker`
    1. This resets all the containers you have!
  9. Build a single container using `bash ./oms_setup.sh -c=traefik`
    1. Using the -c parameter you can specify a single container to perform actions on
  10. Try running the system again, you'll notice it will act similar to the first installation of it.

...