0

Following is the command I tried to build an image

  1. On docker engine

docker build https://gitlab.com/abha10/First_Project/blob/master/Dockerfile.tar.gz

  1. Using Remote API
curl -X POST \
-H "Content-type":"application/tar" \
http://52.203.42.217:2375/build?dockerfile=C:/Abhaya/Dockerfile.tar.gz

And below is the error for the first command

Downloading build context from remote url: https://gitlab.com/abha10/First_Project/blob/master/Dockerfile.tar.gz 12.85 kB
Sending build context to Docker daemon 14.85 kB
Step 1 : <!DOCTYPE
Unknown instruction: <!DOCTYPE

And this is the content inside my docker file

FROM docker/whalesay:latest
 RUN apt-get -y update && apt-get install -y fortunes
 CMD /usr/games/fortune -a | cowsay

This is my private git repository , how we are supposed to pass username and password in the docker command.

In the remote api Docs https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/ under Build image from a Dockerfile I could see X-Registry-Config header, but again unable to the create image.

Abhaya Ghatkar
  • 322
  • 1
  • 5
  • 22

0 Answers0