Download Doubtfire api using Docker - AreejAsiri/doubtfire-api GitHub Wiki
Downloading Doubtfire-api into local machine in MAC OS using Docker
Prerequisites
Docker downloaded on to your local desktop.
Steps for creating the doubtfire-api container
Step 1: Create a folder in your desired directory and open the terminal pointing at the folder location
Step 2: Clone the Doubtfire-api repository to your created folder using the terminal.
$ git clone https://github.com/doubtfire-lms/doubtfire-api
All the files will be copied to your new directory with the folder name Doubtfire-api with all of its contents.
Step 3: Open a new terminal at the Doubtfire-api location that been created at the newly-created directory.
Step 4: Run the following command in the terminal to build the doubtfire-api container
$ docker-compose up --build -d && docker-compose exec api bundle exec rake db:setup db:migrate
Step 5: Check doubtfire-api is up and running by connecting to the localhost http://localhost:3000/api/docs/
You should see all the Doubtfire endpoints, which means the API is running.
Step 6: Stop doubtfire-api container
docker-compose down
Step 7: Run doubtfire-api container
docker-compose up -d && docker-compose exec api bundle exec rake db:setup db:migrate
Step 8: list image and container
$ docker image ls
$ docker container ls