Export Docker

One of the newest feature of Grizzly API is exporting your microservice as docker, in this secton we will present the process of this export.

Export the microservice

  • Considering you have already created your microservice you can now export one of its versions via the Export Docker button in the microservice section.
  • You have to specify the version and you can add a custom tag and a description to your docker image. once you validated your export a new item will be added to table specifying the state and the uri of your image.
export steps

Check the export informations

  • After a while you can refresh your exports table and you'll notice a change in your docker image state and a uri will be provided.
  • You will also recive an email providing the informationof the export and how to use your image
  • export steps
  • If you're new to docker you can check the How to use it it will provide you additional information about pulling and running your image.
  • export steps

    Run your image

    As marked in the How to use modal there’s multiple ways of running your docker. In this section we will explain how to run your image with basic docker commands and by using docker compose.

    Once your image have switched from pending state to running you can execute the commands down below to run your image:

    • Pull image
    docker pull <repository URI>
    
    • Once your image is pulled you can run it now these command require two arguments databaseURI ,databaseName which needs to be mongoDB.Also you can add your image name and its optional. These command allows you also to pull and run your image in one single step. Your image will run by default on port 8050
    docker run -p 8050:8050 --env "databaseUri=<databaseUri>"
    --env "databaseName=<databaseName>" --name=<imageCustomName> <repository URI>
    
    This is the simplest way of running your image in one single step. You’ll need just to download the docker-compose.yml file, then you have to run the docker-compose up -d command in the same repository of your lately downloaded file.

    export steps