# Docker

<figure><img src="https://3194248079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMRDc44tPNsBhsf--dD%2Fuploads%2FBhumf950LezA23DBflg0%2Fdocker.png?alt=media&#x26;token=e5b6cf97-c19d-4d81-8c21-3f5f09498124" alt=""><figcaption></figcaption></figure>

Docker is a platform to containerize OS's and all necessary dependencies. It is a way to package applications, and the associated dependencies into a single unit called an *image*. This image can then be shared and run as a container, either locally as a developer or remotely on a production server.

{% hint style="info" %}
Container: An isolated environment for running an application. It is lightweight, starts quickly, uses the OS of the host, and runs multiple applications in isolation.
{% endhint %}

Commands:

* Get version: `docker version`
* Build docker image: `docker build -t $IMAGENAME`
* Pull docker repo: `docker pull $URL`
* Run image in container: `docker run $IMAGENAME`
* Create debian interactive container: `docker run -it debian`
