Posts

Showing posts from May, 2017

Docker Hub

Image
Introduction To Docker Hub Docker Hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker Cloud so you can deploy images to your hosts. It provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation throughout the development pipeline. Login to your Docker Hub with your unique Docker Id : Docker Hub provides the following major features: Image Repositories: It helps you in finding and pulling images from community and official libraries, and manage, push to, and pull from private image libraries to which you have access. Automated Builds: Automatically create new images when you make changes to a source code repository. Organizations: Create work groups to manage access to image repositories. Create a Docker ID Your Docker ID gives you one private Docker H...

Dockerfile in Docker

Docker can build images automatically by reading the instructions from a Dockerfile, a text file that contains all the commands, in order, needed to build a given image. Dockerfile adhere to a specific format and use a specific set of instructions. Guideline for Dockerfile Containers should be ephemeral The container produced by the image your Dockerfile defines should be as ephemeral as possible. By “ephemeral,” we mean that it can be stopped and destroyed and a new one built and put in place with an absolute minimum of set-up and configuration.  Use a .dockerignore file In most cases, it’s best to put each Dockerfile in an empty directory. Then, add to that directory only the files needed for building the Dockerfile. To increase the build’s performance, you can exclude files and directories by adding a .dockerignore file to that directory as well. Avoid installing unnecessary packages In order to reduce complexity, dependencies, file sizes, and build times, y...