This Repo required for Asac labs class 2
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security allow you to run many containers simultaneously on a given host.
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization.
A container is a runnable instance of an image.
sudo pip install docker-compose
run command docker image build
-Docker is a way to run Linux containers
Containers are a lightweight alternative to Virtual Machines
Dockerfile is a list of instructions for creating an image
Images are made up of one or more layers
Containers are a running instance of an image
docker-compose.yml controls how to run the container
Containers are stateless and ephemeral in nature. We can link - the local filesystem via volumes but things become more complex with databases (which we didn’t cover here).
Django REST framework is a powerful and flexible toolkit for building Web APIs.
Some reasons you might want to use REST framework:
Django REST Framework works alongside the Django web framework to create web APIs. We cannot build a web API with only Django - Rest Framework; it always must be added to a project after Django itself has been installed and configured.
The most important takeaway is that Django creates websites containing webpages, while Django REST Framework creates web APIs which are a collection of URL endpoints containing available HTTP verbs that return JSON.
To illustrate these concepts, we will build out a basic Library website with traditional Django and then extend it into a web API with Django REST Framework.