In the previous recipe, we explored a few actions on Docker images using APIs. In this recipe, we will build a Docker image using the /build API. Here is the /build API snippet from Swagger Editor:

In the previous recipe, we explored a few actions on Docker images using APIs. In this recipe, we will build a Docker image using the /build API. Here is the /build API snippet from Swagger Editor:
$ git clone https://github.com/docker-cookbook/apache2
This repository contains the Dockerfile to bundle an apache2 service; listed here is the content of the Dockerfile:
$ cd apache2 $ tar cvf /tmp/apache2.tar *