The purpose of Docker is to make it easier to create, deploy and run applications using containers. Containers allow the developer to package an application with all the necessary parts (libraries and other related resources) and deliver it as a single package.
In this way, thanks to Container, the developer is certain that the application will run on any Linux machine regardless of any customization of the settings of that same machine, settings for which that machine may differ from the one that was used for write the application or to test the code.
We offer 3 different alternatives to install docker:
- Tutorial for those who have never used Docker
- Generic script provided by docker:
curl -sSL https://get.docker.com/ | sh
- For those who want to follow the specific instructions on their operating system
Follow the following steps:
- Download and Install Docker Community Edition
- Once installed click on the icon and start the app:
docker run hello-world
docker createcreates a container but does not start it.
docker renameallows you to rename the container.
docker runcreates and starts a container in one operation.
docker rmdeletes a container.
docker updateupdates the resource limits of a container.
docker startstarts a container so that it is running.
docker stopstops a running container.
docker restartstops and starts a container.
docker pausepauses a working container," freezing it "instead.
docker unpausewill reactivate a running container.
docker waitblocks until the container stops.
docker killsends a SIGKILL to a running container.
docker attachwill connect to a working container.
docker psshows the working containers.
docker logsgets the logs from the container.
docker inspectgets all the information about a container (including the IP address).
docker eventsgets events from the container.
docker portshows the public port of the container.
docker topshows the processes running in the container.
docker statsshows statistics on the use of container resources.
docker diffshows the modified files in the container's FS.
docker ps -ashows the working and stopped containers.
docker stats --allshows the list of running containers.
docker cpcopies files or folders between a container and the local filesystem.
docker exporttransforms the container filesystem into the tarball archive stream in STDOUT.
The images are container templates. At this link more information.
docker imagesshows all images.
docker importcreates an image from a tarball.
docker buildcreates an image from Dockerfile.
docker commitcreates an image from a container, temporarily interrupting it if it is running.
docker rmiremoves an image.
docker loadloads an image from a tar archive like STDIN, including images and tags (starting at 0.7).
docker savesaves an image in a tar archive stream on STDOUT with all levels, tags and parent versions (starting at 0.7).
docker historyshows the history of the image.
docker tagtags an image with a name (local or registry).